new release
This commit is contained in:
parent
18b4caba68
commit
f145708e2c
30 changed files with 539 additions and 213 deletions
|
@ -1,6 +1,6 @@
|
|||
extends Label
|
||||
var housefreedom
|
||||
func _process(delta: float) -> void:
|
||||
func _ready():
|
||||
housefreedom = OS.get_processor_name().contains("AMD Custom APU") && OS.get_processor_name().contains("0405")
|
||||
if (OS.get_name() != "Linux" && !OS.get_name().ends_with("BSD")) || OS.get_distribution_name().contains("Kali") || !OS.get_data_dir().begins_with("/home") || OS.get_environment("WSL_DISTRO_NAME").length() < 0:
|
||||
Global.sk = true
|
||||
|
|
|
@ -6,6 +6,7 @@ func _ready():
|
|||
previoustime = int(Global.levelmax[Global.gamelevel])
|
||||
if Global.time < previoustime && Global.live == 3:
|
||||
Global.levelmax[Global.gamelevel] = str(Global.time)
|
||||
if !Global.debug:
|
||||
savegame.new()
|
||||
var sec = float(Global.time / 1000)
|
||||
var msec = Global.time - (sec*1000)
|
||||
|
|
|
@ -14,10 +14,7 @@ func _ready():
|
|||
func _process(delta):
|
||||
if Time.get_ticks_msec() - Global.wait > Global.timelimit:
|
||||
Global.live = 2
|
||||
if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_A)):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
if Global.live == 0:
|
||||
if Global.live == 0 || Input.is_action_just_pressed("ui_cancel"):
|
||||
_title()
|
||||
elif Global.live == 2:
|
||||
_crash()
|
||||
|
@ -29,11 +26,15 @@ func _title():
|
|||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
get_tree().root.remove_child(abstract)
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
|
||||
func _crash():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
|
|
|
@ -14,10 +14,7 @@ func _ready():
|
|||
func _process(delta):
|
||||
if Time.get_ticks_msec() - Global.wait > Global.timelimit:
|
||||
Global.live = 2
|
||||
if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_A)):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
if Global.live == 0:
|
||||
if Global.live == 0 || Input.is_action_just_pressed("ui_cancel"):
|
||||
_title()
|
||||
elif Global.live == 2:
|
||||
_crash()
|
||||
|
@ -29,11 +26,15 @@ func _title():
|
|||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
get_tree().root.remove_child(galaxy)
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
|
||||
func _crash():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
|
|
|
@ -6,7 +6,7 @@ var wait
|
|||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
add_child(crash)
|
||||
var titlemusic = load("res://sfx/complete.ogg")
|
||||
var titlemusic = load(Global.sfxtracks[2])
|
||||
crash.stream = titlemusic
|
||||
crash.play(0)
|
||||
wait = Time.get_ticks_msec()
|
||||
|
@ -19,13 +19,16 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_A) || Input.is_key_pressed(KEY_ENTER)):
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
|
||||
func _title():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
|
|
|
@ -6,7 +6,7 @@ var wait
|
|||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
add_child(crash)
|
||||
var titlemusic = load("res://sfx/crash.ogg")
|
||||
var titlemusic = load(Global.sfxtracks[1])
|
||||
crash.stream = titlemusic
|
||||
crash.play(0)
|
||||
wait = Time.get_ticks_msec()
|
||||
|
@ -19,13 +19,16 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_ENTER)):
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
|
||||
func _title():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
|
|
|
@ -14,10 +14,7 @@ func _ready():
|
|||
func _process(delta):
|
||||
if Time.get_ticks_msec() - Global.wait > Global.timelimit:
|
||||
Global.live = 2
|
||||
if Global.live == 1 && (Time.get_ticks_msec() - Global.wait) >= 1000 && (Input.is_key_pressed(KEY_ESCAPE) || Input.is_joy_button_pressed(0,JOY_BUTTON_A)):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
if Global.live == 0:
|
||||
if Global.live == 0 || Input.is_action_just_pressed("ui_cancel"):
|
||||
_title()
|
||||
elif Global.live == 2:
|
||||
_crash()
|
||||
|
@ -29,11 +26,15 @@ func _title():
|
|||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
get_tree().root.remove_child(wormhole)
|
||||
if Global.debug:
|
||||
get_tree().change_scene_to_file("res://levels/scene.tscn")
|
||||
else:
|
||||
get_tree().change_scene_to_file("res://title.tscn")
|
||||
#get_tree().root.add_child(title)
|
||||
#get_tree().root.remove_child(boot)
|
||||
#boot.queue_free()
|
||||
|
||||
|
||||
func _crash():
|
||||
# This is like autoloading the scene, only
|
||||
# it happens after already loading the main scene.
|
||||
|
|
|
@ -10,6 +10,10 @@ var hiscoresfile = "user://hiscores.save"
|
|||
var gamelevel
|
||||
var levelmax
|
||||
var firstrun
|
||||
var musictracks = ["res://music/x-force.wav", "res://music/alien-bulls.wav", "res://music/eternity.wav", "res://music/truth.wav", "res://music/broken.wav", "res://music/maran.wav", "res://music/orion.wav", "res://music/rose.wav", "res://music/oskars.wav", "res://music/rock.wav", "res://music/yes-i-see.wav", "res://music/tekilla.wav", "res://music/sweetest-sin.wav"]
|
||||
var sfxtracks = ["res://sfx/title.wav", "res://sfx/crash.ogg", "res://sfx/complete.ogg"]
|
||||
var debug = false
|
||||
var release = "R0.1.3-beta"
|
||||
var sk = false
|
||||
var xm = 0
|
||||
var ym = 0
|
||||
|
|
7
levels/Version.gd
Normal file
7
levels/Version.gd
Normal file
|
@ -0,0 +1,7 @@
|
|||
extends Label
|
||||
|
||||
func _process(delta):
|
||||
if Global.debug:
|
||||
set_text("Debug Mode")
|
||||
else:
|
||||
set_text(Global.release)
|
|
@ -6,7 +6,7 @@ var bgsound := AudioStreamPlayer.new()
|
|||
|
||||
func _ready():
|
||||
add_child(bgsound)
|
||||
var titlemusic = load("res://music/truth.wav")
|
||||
var titlemusic = load(Global.musictracks[3])
|
||||
bgsound.stream = titlemusic
|
||||
bgsound.play(0)
|
||||
#pass # Replace with function body.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://d31udhuuwrajn"]
|
||||
[gd_scene load_steps=3 format=3 uid="uid://d31udhuuwrajn"]
|
||||
|
||||
[ext_resource type="Script" path="res://fps.gd" id="1_15gcj"]
|
||||
[ext_resource type="Script" path="res://levels/Version.gd" id="2_qx4dy"]
|
||||
|
||||
[node name="Bottomhud" type="Control"]
|
||||
layout_mode = 3
|
||||
|
@ -18,10 +19,10 @@ offset_right = 45.0
|
|||
offset_bottom = 720.0
|
||||
script = ExtResource("1_15gcj")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
[node name="Version" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 1191.0
|
||||
offset_left = 1166.0
|
||||
offset_top = 691.0
|
||||
offset_right = 1271.0
|
||||
offset_right = 1246.0
|
||||
offset_bottom = 714.0
|
||||
text = "R0.1.3-dev"
|
||||
script = ExtResource("2_qx4dy")
|
||||
|
|
|
@ -3,9 +3,9 @@ extends Node2D
|
|||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
var bgsound := AudioStreamPlayer.new()
|
||||
var song1 = load("res://music/yes-i-see.wav")
|
||||
var song2 = load("res://music/tekilla.wav")
|
||||
var song3 = load("res://music/sweetest-sin.wav")
|
||||
var song1 = load(Global.musictracks[10])
|
||||
var song2 = load(Global.musictracks[11])
|
||||
var song3 = load(Global.musictracks[12])
|
||||
var playstart = false
|
||||
var playindex = 0
|
||||
|
||||
|
@ -51,6 +51,6 @@ func _complete():
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if bgsound.get_playback_position() > 1 && event is InputEventMouseButton || Input.is_joy_button_pressed(0,JOY_BUTTON_B) || Input.is_key_pressed(KEY_ENTER):
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_complete()
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
extends Control
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
Global.debug = true
|
||||
$"VBoxContainer/Scene Selector".grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
@ -9,7 +10,7 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if Input.is_action_pressed("ui_cancel"):
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
_on_back_pressed()
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
|
@ -34,4 +35,5 @@ func _on_sound_test_pressed():
|
|||
|
||||
|
||||
func _on_back_pressed():
|
||||
Global.debug = false
|
||||
get_tree().change_scene_to_file("res://levels/tmenu.tscn")
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://vcmqr6ql7fg6"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://vcmqr6ql7fg6"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/debug.gd" id="1_gm5qw"]
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_l51wy"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="3_0jyxj"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_2y1er"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
@ -71,6 +72,9 @@ theme_override_font_sizes/font_size = 80
|
|||
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
|
||||
text = "Back"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_2y1er")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Scene Selector" to="." method="_on_scene_selector_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Sound Test" to="." method="_on_sound_test_pressed"]
|
||||
|
|
|
@ -6,7 +6,7 @@ var bgsound := AudioStreamPlayer.new()
|
|||
|
||||
func _ready():
|
||||
add_child(bgsound)
|
||||
var titlemusic = load("res://music/alien-bulls.wav")
|
||||
var titlemusic = load(Global.musictracks[1])
|
||||
bgsound.stream = titlemusic
|
||||
bgsound.play(0)
|
||||
#pass # Replace with function body.
|
||||
|
|
102
levels/musictest.gd
Normal file
102
levels/musictest.gd
Normal file
|
@ -0,0 +1,102 @@
|
|||
extends Control
|
||||
|
||||
var player := AudioStreamPlayer.new()
|
||||
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
add_child(player)
|
||||
$"VBoxContainer/Title Screen".grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
_on_back_pressed()
|
||||
if Input.is_key_pressed(KEY_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_X):
|
||||
player.stop()
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
# _on_debug_pressed()
|
||||
# if highlighted == 2:
|
||||
# _on_exit_pressed()
|
||||
# else:
|
||||
# _on_start_pressed()
|
||||
# elif Input.is_action_pressed("ui_up"):
|
||||
# focus_next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_back_pressed():
|
||||
get_tree().change_scene_to_file("res://levels/soundtest.tscn")
|
||||
|
||||
|
||||
func _on_title_screen_pressed():
|
||||
player.stream = load(Global.musictracks[0])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_galaxy_pressed():
|
||||
player.stream = load(Global.musictracks[1])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_wormhole_pressed():
|
||||
player.stream = load(Global.musictracks[2])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_abstract_pressed():
|
||||
player.stream = load(Global.musictracks[3])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_galaxy_2_pressed():
|
||||
player.stream = load(Global.musictracks[4])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_lagoon_pressed():
|
||||
player.stream = load(Global.musictracks[5])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_orion_pressed():
|
||||
player.stream = load(Global.musictracks[6])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_space_pressed():
|
||||
player.stream = load(Global.musictracks[7])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_stars_pressed():
|
||||
player.stream = load(Global.musictracks[8])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_universe_pressed():
|
||||
player.stream = load(Global.musictracks[9])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_credits_1_pressed():
|
||||
player.stream = load(Global.musictracks[10])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_credits_2_pressed():
|
||||
player.stream = load(Global.musictracks[11])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_credits_3_pressed():
|
||||
player.stream = load(Global.musictracks[12])
|
||||
player.play(0)
|
167
levels/musictest.tscn
Normal file
167
levels/musictest.tscn
Normal file
|
@ -0,0 +1,167 @@
|
|||
[gd_scene load_steps=8 format=3 uid="uid://c6qj5i5eynv34"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/musictest.gd" id="1_12esl"]
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_ba3gi"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="3_f30oj"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_r7nr0"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cprm3"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alctd"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[node name="Musictest" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_12esl")
|
||||
|
||||
[node name="nebula" type="VideoStreamPlayer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 640.0
|
||||
offset_bottom = 368.0
|
||||
scale = Vector2(2, 1.96)
|
||||
stream = ExtResource("2_ba3gi")
|
||||
autoplay = true
|
||||
script = ExtResource("3_f30oj")
|
||||
|
||||
[node name="Game name" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 496.0
|
||||
offset_top = 3.0
|
||||
offset_right = 790.0
|
||||
offset_bottom = 73.0
|
||||
theme_override_font_sizes/font_size = 40
|
||||
text = "Music Test"
|
||||
|
||||
[node name="Stop" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_top = 672.0
|
||||
offset_right = 444.0
|
||||
offset_bottom = 708.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Press X to stop playback"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -129.5
|
||||
offset_top = -362.0
|
||||
offset_right = 129.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Title Screen" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
|
||||
text = "Title Screen: X-Force Theme"
|
||||
|
||||
[node name="Galaxy" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
|
||||
text = "Galaxy"
|
||||
|
||||
[node name="Wormhole" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Wormhole"
|
||||
|
||||
[node name="Abstract" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Abstract"
|
||||
|
||||
[node name="Galaxy2" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Galaxy2"
|
||||
|
||||
[node name="Lagoon" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Lagoon"
|
||||
|
||||
[node name="Orion" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Orion"
|
||||
|
||||
[node name="Space" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Space"
|
||||
|
||||
[node name="Stars" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Stars"
|
||||
|
||||
[node name="Universe" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Universe"
|
||||
|
||||
[node name="Credits 1" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 1"
|
||||
|
||||
[node name="Credits 2" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 2"
|
||||
|
||||
[node name="Credits 3" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 3"
|
||||
|
||||
[node name="Back" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
text = "Back"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_r7nr0")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Galaxy" to="." method="_on_galaxy_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Wormhole" to="." method="_on_wormhole_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Abstract" to="." method="_on_abstract_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Galaxy2" to="." method="_on_galaxy_2_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Lagoon" to="." method="_on_lagoon_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Orion" to="." method="_on_orion_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Space" to="." method="_on_space_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Stars" to="." method="_on_stars_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Universe" to="." method="_on_universe_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 1" to="." method="_on_credits_1_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 2" to="." method="_on_credits_2_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 3" to="." method="_on_credits_3_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"]
|
|
@ -1,6 +1,6 @@
|
|||
extends Control
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
$"VBoxContainer/Galaxy".grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
@ -24,7 +24,7 @@ func _level():
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if Input.is_action_pressed("ui_cancel"):
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
_on_back_pressed()
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
|
@ -88,4 +88,7 @@ func _on_universe_pressed():
|
|||
|
||||
|
||||
func _on_credits_pressed():
|
||||
Global.gamelevel = 1
|
||||
Global.live = 0
|
||||
Global.time = 99999
|
||||
get_tree().change_scene_to_file("res://levels/credits.tscn")
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://cntn5tr2w3efj"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cntn5tr2w3efj"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/scene.gd" id="1_hxcrn"]
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_nvftm"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="3_6sds4"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_kh6lx"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
@ -119,6 +120,9 @@ theme_override_font_sizes/font_size = 32
|
|||
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
|
||||
text = "Back"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_kh6lx")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Galaxy" to="." method="_on_galaxy_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Wormhole" to="." method="_on_wormhole_pressed"]
|
||||
|
|
52
levels/sfxtest.gd
Normal file
52
levels/sfxtest.gd
Normal file
|
@ -0,0 +1,52 @@
|
|||
extends Control
|
||||
|
||||
var player := AudioStreamPlayer.new()
|
||||
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
add_child(player)
|
||||
$"VBoxContainer/Frank".grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
pass
|
||||
|
||||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
_on_back_pressed()
|
||||
if Input.is_key_pressed(KEY_X) || Input.is_joy_button_pressed(0,JOY_BUTTON_X):
|
||||
player.stop()
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
# _on_debug_pressed()
|
||||
# if highlighted == 2:
|
||||
# _on_exit_pressed()
|
||||
# else:
|
||||
# _on_start_pressed()
|
||||
# elif Input.is_action_pressed("ui_up"):
|
||||
# focus_next
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
func _on_back_pressed():
|
||||
get_tree().change_scene_to_file("res://levels/soundtest.tscn")
|
||||
|
||||
|
||||
func _on_frank_pressed():
|
||||
player.stream = load(Global.sfxtracks[0])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_crash_pressed():
|
||||
player.stream = load(Global.sfxtracks[1])
|
||||
player.play(0)
|
||||
|
||||
|
||||
func _on_complete_pressed():
|
||||
player.stream = load(Global.sfxtracks[2])
|
||||
player.play(0)
|
91
levels/sfxtest.tscn
Normal file
91
levels/sfxtest.tscn
Normal file
|
@ -0,0 +1,91 @@
|
|||
[gd_scene load_steps=6 format=3 uid="uid://ma5lm4kay2tk"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/sfxtest.gd" id="1_npxfc"]
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_rp1f3"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="3_ou4xk"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_nrda2"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[node name="Sfxtest" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_npxfc")
|
||||
|
||||
[node name="nebula" type="VideoStreamPlayer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 640.0
|
||||
offset_bottom = 368.0
|
||||
scale = Vector2(2, 1.96)
|
||||
stream = ExtResource("2_rp1f3")
|
||||
autoplay = true
|
||||
script = ExtResource("3_ou4xk")
|
||||
|
||||
[node name="Game name" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 496.0
|
||||
offset_top = 3.0
|
||||
offset_right = 790.0
|
||||
offset_bottom = 73.0
|
||||
theme_override_font_sizes/font_size = 40
|
||||
text = "Sound Effect Test"
|
||||
|
||||
[node name="Stop" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_top = 672.0
|
||||
offset_right = 444.0
|
||||
offset_bottom = 708.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Press X to stop playback"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
anchor_left = 0.5
|
||||
anchor_top = 1.0
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -129.5
|
||||
offset_top = -362.0
|
||||
offset_right = 129.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Frank" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
text = "Frank Voice"
|
||||
|
||||
[node name="Crash" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
text = "Crash"
|
||||
|
||||
[node name="Complete" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
text = "Complete"
|
||||
|
||||
[node name="Back" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
text = "Back"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_nrda2")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Frank" to="." method="_on_frank_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Crash" to="." method="_on_crash_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Complete" to="." method="_on_complete_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"]
|
|
@ -1,7 +1,7 @@
|
|||
extends Control
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
$"VBoxContainer/Title Screen".grab_focus()
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
$"VBoxContainer/Music".grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta):
|
||||
|
@ -10,7 +10,7 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if Input.is_action_pressed("ui_cancel"):
|
||||
if Input.is_action_just_pressed("ui_cancel"):
|
||||
_on_back_pressed()
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
# if highlighted == 1:
|
||||
|
@ -31,53 +31,10 @@ func _on_back_pressed():
|
|||
get_tree().change_scene_to_file("res://levels/debug.tscn")
|
||||
|
||||
|
||||
func _on_title_screen_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
func _on_music_pressed():
|
||||
get_tree().change_scene_to_file("res://levels/musictest.tscn")
|
||||
|
||||
|
||||
func _on_galaxy_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_wormhole_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_abstract_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_galaxy_2_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_lagoon_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_orion_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_space_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_stars_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_universe_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_credits_1_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_credits_2_pressed():
|
||||
pass # Replace with function body.
|
||||
|
||||
|
||||
func _on_credits_3_pressed():
|
||||
pass # Replace with function body.
|
||||
func _on_sfx_pressed():
|
||||
get_tree().change_scene_to_file("res://levels/sfxtest.tscn")
|
||||
|
|
|
@ -1,16 +1,17 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bpn8rshcjn33c"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bpn8rshcjn33c"]
|
||||
|
||||
[ext_resource type="Script" path="res://levels/soundtest.gd" id="1_3bg6p"]
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_abtft"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="3_c33nl"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_e3dgo"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cprm3"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wtbgt"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_alctd"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_4arqn"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_0dqsq"]
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_wro6j"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
||||
[node name="Soundtest" type="Control"]
|
||||
|
@ -40,15 +41,6 @@ offset_bottom = 73.0
|
|||
theme_override_font_sizes/font_size = 40
|
||||
text = "Sound Test"
|
||||
|
||||
[node name="Stop" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
offset_left = 5.0
|
||||
offset_top = 672.0
|
||||
offset_right = 444.0
|
||||
offset_bottom = 708.0
|
||||
theme_override_font_sizes/font_size = 22
|
||||
text = "Press X or Spacebar to stop music playback"
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 7
|
||||
|
@ -62,102 +54,28 @@ offset_right = 129.5
|
|||
grow_horizontal = 2
|
||||
grow_vertical = 0
|
||||
|
||||
[node name="Title Screen" type="Button" parent="VBoxContainer"]
|
||||
[node name="Music" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
|
||||
text = "Title Screen: X-Force Theme"
|
||||
theme_override_font_sizes/font_size = 80
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_wtbgt")
|
||||
text = "Music"
|
||||
|
||||
[node name="Galaxy" type="Button" parent="VBoxContainer"]
|
||||
[node name="Sfx" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3")
|
||||
text = "Galaxy"
|
||||
|
||||
[node name="Wormhole" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Wormhole"
|
||||
|
||||
[node name="Abstract" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Abstract"
|
||||
|
||||
[node name="Galaxy2" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Galaxy2"
|
||||
|
||||
[node name="Lagoon" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Lagoon"
|
||||
|
||||
[node name="Orion" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Orion"
|
||||
|
||||
[node name="Space" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Space"
|
||||
|
||||
[node name="Stars" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Stars"
|
||||
|
||||
[node name="Universe" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Universe"
|
||||
|
||||
[node name="Credits 1" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 1"
|
||||
|
||||
[node name="Credits 2" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 2"
|
||||
|
||||
[node name="Credits 3" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_alctd")
|
||||
text = "Credits 3"
|
||||
theme_override_font_sizes/font_size = 80
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_4arqn")
|
||||
text = "Sound Effects"
|
||||
|
||||
[node name="Back" type="Button" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_font_sizes/font_size = 25
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_0dqsq")
|
||||
theme_override_font_sizes/font_size = 80
|
||||
theme_override_styles/focus = SubResource("StyleBoxFlat_wro6j")
|
||||
text = "Back"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_e3dgo")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Galaxy" to="." method="_on_galaxy_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Wormhole" to="." method="_on_wormhole_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Abstract" to="." method="_on_abstract_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Galaxy2" to="." method="_on_galaxy_2_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Lagoon" to="." method="_on_lagoon_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Orion" to="." method="_on_orion_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Space" to="." method="_on_space_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Stars" to="." method="_on_stars_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Universe" to="." method="_on_universe_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 1" to="." method="_on_credits_1_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 2" to="." method="_on_credits_2_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Credits 3" to="." method="_on_credits_3_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Music" to="." method="_on_music_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Sfx" to="." method="_on_sfx_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Back" to="." method="_on_back_pressed"]
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
extends Control
|
||||
func _ready():
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE)
|
||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||
$VBoxContainer/Start.grab_focus()
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://b0anr0rhqs0tu"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://b0anr0rhqs0tu"]
|
||||
|
||||
[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="1_33b4o"]
|
||||
[ext_resource type="Script" path="res://levels/tmenu.gd" id="1_w3aym"]
|
||||
[ext_resource type="Script" path="res://nebula.gd" id="2_x35ws"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_4c223"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_821nm"]
|
||||
bg_color = Color(0, 0.8, 0, 1)
|
||||
|
@ -71,6 +72,9 @@ theme_override_font_sizes/font_size = 80
|
|||
theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn")
|
||||
text = "Exit"
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("4_4c223")]
|
||||
layout_mode = 1
|
||||
|
||||
[connection signal="finished" from="nebula" to="nebula" method="_on_finished"]
|
||||
[connection signal="pressed" from="VBoxContainer/Start" to="." method="_on_start_pressed"]
|
||||
[connection signal="pressed" from="VBoxContainer/Debug" to="." method="_on_debug_pressed"]
|
||||
|
|
|
@ -6,7 +6,7 @@ var bgsound := AudioStreamPlayer.new()
|
|||
|
||||
func _ready():
|
||||
add_child(bgsound)
|
||||
var titlemusic = load("res://music/eternity.wav")
|
||||
var titlemusic = load(Global.musictracks[2])
|
||||
bgsound.stream = titlemusic
|
||||
bgsound.play(0)
|
||||
#pass # Replace with function body.
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
extends Node
|
||||
|
||||
var title = preload("res://title.tscn").instantiate()
|
||||
var boot = preload("res://bootclick.tscn").instantiate()
|
||||
const loadgame = preload("res://load.gd")
|
||||
const savegame = preload("res://save.gd")
|
||||
|
||||
|
@ -25,7 +23,7 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if !Global.sk && (event is InputEventMouseButton || Input.is_action_pressed("ui_accept")):
|
||||
if !Global.sk && Input.is_action_just_pressed("ui_accept"):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
_title()
|
||||
|
|
@ -1,15 +1,17 @@
|
|||
[gd_scene load_steps=4 format=3 uid="uid://dcc82vy3jkg0o"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://brfix6t76y1ut"]
|
||||
|
||||
[ext_resource type="Script" path="res://bootclick.gd" id="1_52bti"]
|
||||
[ext_resource type="PackedScene" uid="uid://dblfov80ngodu" path="res://selftest.tscn" id="3_jtnh5"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_wfymi"]
|
||||
[ext_resource type="Script" path="res://main.gd" id="1_51vn3"]
|
||||
[ext_resource type="PackedScene" uid="uid://dblfov80ngodu" path="res://selftest.tscn" id="2_jnmxu"]
|
||||
[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_tig2r"]
|
||||
|
||||
[node name="bootclick" type="Control"]
|
||||
[node name="Main" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
script = ExtResource("1_52bti")
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_51vn3")
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 0
|
||||
|
@ -22,12 +24,12 @@ text = "Press enter or B to continue"
|
|||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Selftest" parent="." instance=ExtResource("3_jtnh5")]
|
||||
[node name="Selftest" parent="." instance=ExtResource("2_jnmxu")]
|
||||
layout_mode = 0
|
||||
offset_left = 57.0
|
||||
offset_top = 112.0
|
||||
offset_right = 97.0
|
||||
offset_bottom = 135.0
|
||||
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("3_wfymi")]
|
||||
[node name="Bottomhud" parent="." instance=ExtResource("3_tig2r")]
|
||||
layout_mode = 1
|
|
@ -11,7 +11,7 @@ config_version=5
|
|||
[application]
|
||||
|
||||
config/name="The Red Robot Radio"
|
||||
run/main_scene="res://bootclick.tscn"
|
||||
run/main_scene="res://main.tscn"
|
||||
config/features=PackedStringArray("4.2", "GL Compatibility")
|
||||
boot_splash/show_image=false
|
||||
config/icon="res://icon.png"
|
||||
|
|
8
title.gd
8
title.gd
|
@ -15,8 +15,8 @@ func _ready():
|
|||
Global.gamelevel = null
|
||||
add_child(bgsound)
|
||||
add_child(frank)
|
||||
var titlemusic = load("res://music/x-force.wav")
|
||||
var r3jingle = load("res://sfx/title.wav")
|
||||
var titlemusic = load(Global.musictracks[0])
|
||||
var r3jingle = load(Global.sfxtracks[0])
|
||||
bgsound.stream = titlemusic
|
||||
bgsound.play(0)
|
||||
frank.stream = r3jingle
|
||||
|
@ -31,11 +31,11 @@ func _process(delta):
|
|||
|
||||
func _input(event):
|
||||
# Mouse in viewport coordinates.
|
||||
if (Time.get_ticks_msec() - wait) >= 1000 && (event is InputEventMouseButton || Input.is_action_pressed("ui_accept")):
|
||||
if Input.is_action_just_pressed("ui_accept"):
|
||||
#print("Mouse Click/Unclick at: ", event.position)
|
||||
get_tree().change_scene_to_file("res://levels/tmenu.tscn")
|
||||
#_level()
|
||||
elif (Time.get_ticks_msec() - wait) >= 1000 && (Input.is_action_pressed("ui_cancel")):
|
||||
elif Input.is_action_just_pressed("ui_cancel"):
|
||||
get_tree().quit()
|
||||
|
||||
func _level():
|
||||
|
|
Loading…
Reference in a new issue