diff --git a/Label2.gd b/Label2.gd index f1ca277..783a4c2 100644 --- a/Label2.gd +++ b/Label2.gd @@ -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 diff --git a/backgounds/disclaimer.gd b/backgounds/disclaimer.gd index 9db6fb1..e3728a9 100644 --- a/backgounds/disclaimer.gd +++ b/backgounds/disclaimer.gd @@ -6,7 +6,7 @@ var wait func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(rmusic) - var titlemusic = load("res://music/Jellies.wav") + var titlemusic = load(Global.musictracks[1]) rmusic.stream = titlemusic rmusic.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_X) || 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://levels/credits.tscn") #get_tree().root.add_child(title) #get_tree().root.remove_child(boot) diff --git a/backgounds/disclaimer.tscn b/backgounds/disclaimer.tscn index 99e8cbe..17a3fc2 100644 --- a/backgounds/disclaimer.tscn +++ b/backgounds/disclaimer.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://backgounds/disclaimer.gd" id="1_wnnd2"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [node name="Disclaimer" type="Node2D"] script = ExtResource("1_wnnd2") diff --git a/backgounds/result.gd b/backgounds/result.gd index 60943fa..1f5668d 100644 --- a/backgounds/result.gd +++ b/backgounds/result.gd @@ -6,7 +6,7 @@ var wait func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(rmusic) - var titlemusic = load("res://music/XsEdzesSs.wav") + var titlemusic = load(Global.musictracks[7]) rmusic.stream = titlemusic rmusic.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_X) || 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://backgounds/wip.tscn") #get_tree().root.add_child(title) #get_tree().root.remove_child(boot) diff --git a/backgounds/result.tscn b/backgounds/result.tscn index 9ecd5a9..5b2e8fc 100644 --- a/backgounds/result.tscn +++ b/backgounds/result.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://backgounds/result.gd" id="1_ejbiw"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [node name="Result" type="Node2D"] script = ExtResource("1_ejbiw") diff --git a/backgounds/wip.gd b/backgounds/wip.gd index fe45c11..ef61110 100644 --- a/backgounds/wip.gd +++ b/backgounds/wip.gd @@ -6,7 +6,7 @@ var wait func _ready(): Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) add_child(rmusic) - var titlemusic = load("res://music/Jellies.wav") + var titlemusic = load(Global.musictracks[1]) rmusic.stream = titlemusic rmusic.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_X) || 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) diff --git a/backgounds/wip.tscn b/backgounds/wip.tscn index 38db6e3..ae15fc9 100644 --- a/backgounds/wip.tscn +++ b/backgounds/wip.tscn @@ -2,7 +2,7 @@ [ext_resource type="Script" path="res://backgounds/wip.gd" id="1_1qonj"] [ext_resource type="Texture2D" uid="uid://becayb0ro0bd4" path="res://backgounds/midoriasgardius.jpg" id="2_gghyy"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_sdx6y"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_sdx6y"] [node name="WIP" type="Node2D"] script = ExtResource("1_1qonj") diff --git a/bootclick.tscn b/bootclick.tscn deleted file mode 100644 index d51d7e7..0000000 --- a/bootclick.tscn +++ /dev/null @@ -1,33 +0,0 @@ -[gd_scene load_steps=4 format=3 uid="uid://yumpp02h7ma2"] - -[ext_resource type="Script" path="res://bootclick.gd" id="1_52bti"] -[ext_resource type="PackedScene" path="res://selftest.tscn" id="3_jtnh5"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="3_wfymi"] - -[node name="bootclick" type="Control"] -layout_mode = 3 -anchors_preset = 0 -offset_right = 40.0 -offset_bottom = 40.0 -script = ExtResource("1_52bti") - -[node name="Label" type="Label" parent="."] -layout_mode = 0 -offset_left = 290.0 -offset_top = 258.0 -offset_right = 949.0 -offset_bottom = 326.0 -theme_override_font_sizes/font_size = 49 -text = "Press enter or B to continue" -horizontal_alignment = 1 -vertical_alignment = 1 - -[node name="Selftest" parent="." instance=ExtResource("3_jtnh5")] -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")] -layout_mode = 1 diff --git a/global.gd b/global.gd index 30ca484..53c0eda 100644 --- a/global.gd +++ b/global.gd @@ -10,6 +10,10 @@ var hiscoresfile = "user://hiscores.save" var gamelevel var levelmax var firstrun +var musictracks = ["res://music/reloaded.wav", "res://music/Jellies.wav", "res://music/getabrain.wav", "res://music/oskars.wav", "res://music/extralife.wav", "res://music/layers.wav", "res://music/caramel.wav", "res://music/XsEdzesSs.wav", "res://music/shakeshark.wav", "res://music/zubmarine.wav", "res://music/crammin.wav", "res://music/func.wav", "res://music/kaveh.wav", "res://music/rock.wav", "res://music/milkyway.wav", "res://music/sweetener.wav", "res://music/tooold.wav", "res://music/portello.wav"] +var sfxtracks = [] +var debug = false +var release = "R0.0.0-dev" var sk = false var xm = 0 var ym = 0 diff --git a/icon.png b/icon.png index 34635be..aee7d93 100644 Binary files a/icon.png and b/icon.png differ diff --git a/levels/Version.gd b/levels/Version.gd new file mode 100644 index 0000000..15cf202 --- /dev/null +++ b/levels/Version.gd @@ -0,0 +1,7 @@ +extends Label + +func _process(delta): + if Global.debug: + set_text("Debug Mode") + else: + set_text(Global.release) diff --git a/levels/bottomhud.tscn b/levels/bottomhud.tscn index df9af23..a6244d7 100644 --- a/levels/bottomhud.tscn +++ b/levels/bottomhud.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=2 format=3 uid="uid://wovn8m050haq"] +[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.0.0-dev" +script = ExtResource("2_qx4dy") diff --git a/levels/credits.gd b/levels/credits.gd index 501bcd1..23298b6 100644 --- a/levels/credits.gd +++ b/levels/credits.gd @@ -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/sweetener.wav") -var song2 = load("res://music/tooold.wav") -var song3 = load("res://music/portello.wav") +var song1 = load(Global.musictracks[15]) +var song2 = load(Global.musictracks[16]) +var song3 = load(Global.musictracks[17]) var playstart = false var playindex = 0 @@ -44,6 +44,9 @@ func _process(delta): func _complete(): # 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://backgounds/result.tscn") #get_tree().root.add_child(title) #get_tree().root.remove_child(boot) @@ -51,6 +54,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_X) || Input.is_key_pressed(KEY_ENTER): + if Input.is_action_just_pressed("ui_accept"): #print("Mouse Click/Unclick at: ", event.position) _complete() diff --git a/levels/credits.tscn b/levels/credits.tscn index a1bbd2e..fbbfb64 100644 --- a/levels/credits.tscn +++ b/levels/credits.tscn @@ -3,7 +3,7 @@ [ext_resource type="Script" path="res://levels/credits.gd" id="1_y6orl"] [ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_0cref"] [ext_resource type="Script" path="res://nebula.gd" id="3_ffw0g"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="5_yvope"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="5_yvope"] [ext_resource type="Script" path="res://levels/roll.gd" id="6_3q8sp"] [node name="credits" type="Node2D"] @@ -447,6 +447,9 @@ For let me know that fireworks can make a fun game SNK For let me know that a Heavy Machine Gun can be turned into a good stage boss +OMOCAT +For let me know that sketch graphics can give good results + Contact info Email diff --git a/levels/debug.gd b/levels/debug.gd index 829f86f..7466324 100644 --- a/levels/debug.gd +++ b/levels/debug.gd @@ -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. @@ -25,7 +26,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: @@ -48,4 +49,5 @@ func _on_sound_test_pressed(): func _on_back_pressed(): + Global.debug = false get_tree().change_scene_to_file("res://levels/tmenu.tscn") diff --git a/levels/debug.tscn b/levels/debug.tscn index 3952aa9..73d2aaf 100644 --- a/levels/debug.tscn +++ b/levels/debug.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=7 format=3 uid="uid://brrta1s63r2q2"] +[gd_scene load_steps=8 format=3 uid="uid://brrta1s63r2q2"] [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_ogmre"] [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_ogmre")] +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"] diff --git a/levels/musictest.gd b/levels/musictest.gd new file mode 100644 index 0000000..4e5eb3a --- /dev/null +++ b/levels/musictest.gd @@ -0,0 +1,142 @@ +extends Control + +var player := AudioStreamPlayer.new() + +func _ready(): + Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + add_child(player) + $"BoxContainer/VBoxContainer/Title Screen".grab_focus() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _level(): + # This is like autoloading the scene, only + # it happens after already loading the main scene. + get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn") + #Global.live = 1 + #Global.gamelevel = randi() % 3 + #if Global.gamelevel == 0: + # get_tree().change_scene_to_file("res://backgounds/galaxy.tscn") + #elif Global.gamelevel == 1: + # get_tree().change_scene_to_file("res://backgounds/wormhole.tscn") + #else: + # get_tree().change_scene_to_file("res://backgounds/abstract.tscn") + #get_tree().root.add_child(title) + #get_tree().root.remove_child(boot) + #boot.queue_free() + +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_disclaimer_settings_stores_pressed(): + player.stream = load(Global.musictracks[1]) + player.play(0) + + + + +func _on_testrooms_pressed(): + player.stream = load(Global.musictracks[2]) + player.play(0) + + +func _on_friendly_challenge_pressed(): + player.stream = load(Global.musictracks[3]) + player.play(0) + + +func _on_school_nursery_pressed(): + player.stream = load(Global.musictracks[4]) + player.play(0) + + +func _on_overworld_ceres_pressed(): + player.stream = load(Global.musictracks[5]) + player.play(0) + + +func _on_boss_fight_ceres_pressed(): + player.stream = load(Global.musictracks[6]) + player.play(0) + + +func _on_result_pressed(): + player.stream = load(Global.musictracks[7]) + player.play(0) + + +func _on_overworld_earth_pressed(): + player.stream = load(Global.musictracks[8]) + player.play(0) + + +func _on_the_zubmarine_zone_pressed(): + player.stream = load(Global.musictracks[9]) + player.play(0) + + +func _on_radioactive_desert_pressed(): + player.stream = load(Global.musictracks[10]) + player.play(0) + + +func _on_boss_fight_earth_pressed(): + player.stream = load(Global.musictracks[11]) + player.play(0) + + +func _on_dungeon_of_destruction_pressed(): + player.stream = load(Global.musictracks[12]) + player.play(0) + + +func _on_final_boss_fight_pressed(): + player.stream = load(Global.musictracks[13]) + player.play(0) + + +func _on_ending_theme_pressed(): + player.stream = load(Global.musictracks[14]) + player.play(0) + + +func _on_credits_1_pressed(): + player.stream = load(Global.musictracks[15]) + player.play(0) + + +func _on_credits_2_pressed(): + player.stream = load(Global.musictracks[16]) + player.play(0) + + +func _on_credits_3_pressed(): + player.stream = load(Global.musictracks[17]) + player.play(0) diff --git a/levels/musictest.tscn b/levels/musictest.tscn new file mode 100644 index 0000000..a703a86 --- /dev/null +++ b/levels/musictest.tscn @@ -0,0 +1,212 @@ +[gd_scene load_steps=8 format=3 uid="uid://v2cnmd1atfw1"] + +[ext_resource type="Script" path="res://levels/musictest.gd" id="1_mulrj"] +[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_hc5pw"] +[ext_resource type="Script" path="res://nebula.gd" id="3_4oqoj"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_a1ux8"] + +[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_mulrj") + +[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_hc5pw") +autoplay = true +script = ExtResource("3_4oqoj") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_right = 40.0 +offset_bottom = 23.0 + +[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="BoxContainer" type="BoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -640.0 +offset_top = -419.0 +grow_horizontal = 0 +grow_vertical = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"] +layout_mode = 2 + +[node name="Title Screen" type="Button" parent="BoxContainer/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="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") +text = "Disclaimer, Settings, Stores" + +[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Testrooms" + +[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Friendly challenge" + +[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "School nursery" + +[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Overworld (Ceres)" + +[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Boss fight (Ceres)" + +[node name="Result" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Result Screen" + +[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Overworld (Earth)" + +[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"] +layout_mode = 2 + +[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "The Zubmarine Zone" + +[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Radioactive Desert" + +[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Boss Fight (Earth)" + +[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Dungeon of Destruction" + +[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Final Boss Fight" + +[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Ending Theme" + +[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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_a1ux8")] +layout_mode = 1 + +[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Disclaimer, Settings, Stores" to="." method="_on_disclaimer_settings_stores_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Testrooms" to="." method="_on_testrooms_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Friendly challenge" to="." method="_on_friendly_challenge_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/School nursery" to="." method="_on_school_nursery_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Ceres)" to="." method="_on_overworld_ceres_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Boss fight (Ceres)" to="." method="_on_boss_fight_ceres_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Result" to="." method="_on_result_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Earth)" to="." method="_on_overworld_earth_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/The Zubmarine Zone" to="." method="_on_the_zubmarine_zone_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Radioactive Desert" to="." method="_on_radioactive_desert_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Boss Fight (Earth)" to="." method="_on_boss_fight_earth_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Dungeon of Destruction" to="." method="_on_dungeon_of_destruction_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Final Boss Fight" to="." method="_on_final_boss_fight_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Ending Theme" to="." method="_on_ending_theme_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 1" to="." method="_on_credits_1_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 2" to="." method="_on_credits_2_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 3" to="." method="_on_credits_3_pressed"] +[connection signal="pressed" from="BoxContainer/VBoxContainer2/Back" to="." method="_on_back_pressed"] diff --git a/levels/scene.gd b/levels/scene.gd index c6ee77d..724d55f 100644 --- a/levels/scene.gd +++ b/levels/scene.gd @@ -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/Disclaimer".grab_focus() # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -25,7 +25,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: diff --git a/levels/scene.tscn b/levels/scene.tscn index cf6d32f..2fe977e 100644 --- a/levels/scene.tscn +++ b/levels/scene.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=6 format=3 uid="uid://duyxejhnys1l4"] +[gd_scene load_steps=7 format=3 uid="uid://duyxejhnys1l4"] [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_2y7h7"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6u0xs"] bg_color = Color(0, 0.8, 0, 1) @@ -80,6 +81,9 @@ theme_override_font_sizes/font_size = 32 theme_override_styles/focus = SubResource("StyleBoxFlat_r2qrn") text = "Back" +[node name="Bottomhud" parent="." instance=ExtResource("4_2y7h7")] +layout_mode = 1 + [connection signal="finished" from="nebula" to="nebula" method="_on_finished"] [connection signal="pressed" from="VBoxContainer/Disclaimer" to="." method="_on_disclaimer_pressed"] [connection signal="pressed" from="VBoxContainer/Results" to="." method="_on_results_pressed"] diff --git a/levels/sfxtest.gd b/levels/sfxtest.gd new file mode 100644 index 0000000..a493e04 --- /dev/null +++ b/levels/sfxtest.gd @@ -0,0 +1,52 @@ +extends Control + +var player := AudioStreamPlayer.new() + +func _ready(): + Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN) + add_child(player) + $"BoxContainer/VBoxContainer/Title Screen".grab_focus() + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta): + pass + + +func _level(): + # This is like autoloading the scene, only + # it happens after already loading the main scene. + get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn") + #Global.live = 1 + #Global.gamelevel = randi() % 3 + #if Global.gamelevel == 0: + # get_tree().change_scene_to_file("res://backgounds/galaxy.tscn") + #elif Global.gamelevel == 1: + # get_tree().change_scene_to_file("res://backgounds/wormhole.tscn") + #else: + # get_tree().change_scene_to_file("res://backgounds/abstract.tscn") + #get_tree().root.add_child(title) + #get_tree().root.remove_child(boot) + #boot.queue_free() + +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") + diff --git a/levels/sfxtest.tscn b/levels/sfxtest.tscn new file mode 100644 index 0000000..ca5c7a7 --- /dev/null +++ b/levels/sfxtest.tscn @@ -0,0 +1,182 @@ +[gd_scene load_steps=8 format=3 uid="uid://cv2a37xetkkse"] + +[ext_resource type="Script" path="res://levels/sfxtest.gd" id="1_l1lbb"] +[ext_resource type="VideoStream" path="res://backgounds/nebula_-_6044 (720p).ogv" id="2_c55jp"] +[ext_resource type="Script" path="res://nebula.gd" id="3_yeu3h"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="4_xxv3m"] + +[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="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_l1lbb") + +[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_c55jp") +autoplay = true +script = ExtResource("3_yeu3h") + +[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="BoxContainer" type="BoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -640.0 +offset_top = -419.0 +grow_horizontal = 0 +grow_vertical = 0 + +[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"] +layout_mode = 2 + +[node name="Title Screen" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") +text = "Title Screen" + +[node name="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") +text = "Disclaimer, Settings, Stores" + +[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Testrooms" + +[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Friendly challenge" + +[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "School nursery" + +[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Overworld (Ceres)" + +[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Boss fight (Ceres)" + +[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Overworld (Earth)" + +[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "The Zubmarine Zone" + +[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"] +layout_mode = 2 + +[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Radioactive Desert" + +[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Boss Fight (Earth)" + +[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Dungeon of Destruction" + +[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Final Boss Fight" + +[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"] +layout_mode = 2 +theme_override_font_sizes/font_size = 25 +theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") +text = "Ending Theme" + +[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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="BoxContainer/VBoxContainer2"] +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_xxv3m")] +layout_mode = 1 + +[connection signal="finished" from="nebula" to="nebula" method="_on_finished"] diff --git a/levels/soundtest.gd b/levels/soundtest.gd index beb4cb6..95f7fc9 100644 --- a/levels/soundtest.gd +++ b/levels/soundtest.gd @@ -1,32 +1,16 @@ extends Control func _ready(): - Input.set_mouse_mode(Input.MOUSE_MODE_VISIBLE) - $"BoxContainer/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): pass -func _level(): - # This is like autoloading the scene, only - # it happens after already loading the main scene. - get_tree().change_scene_to_file("res://backgounds/disclaimer.tscn") - #Global.live = 1 - #Global.gamelevel = randi() % 3 - #if Global.gamelevel == 0: - # get_tree().change_scene_to_file("res://backgounds/galaxy.tscn") - #elif Global.gamelevel == 1: - # get_tree().change_scene_to_file("res://backgounds/wormhole.tscn") - #else: - # get_tree().change_scene_to_file("res://backgounds/abstract.tscn") - #get_tree().root.add_child(title) - #get_tree().root.remove_child(boot) - #boot.queue_free() - 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: @@ -41,72 +25,16 @@ func _input(event): + + 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_credits_1_pressed(): - pass # Replace with function body. +func _on_music_pressed(): + get_tree().change_scene_to_file("res://levels/musictest.tscn") -func _on_credits_2_pressed(): - pass # Replace with function body. - - -func _on_credits_3_pressed(): - pass # Replace with function body. - - -func _on_disclaimer_settings_stores_pressed(): - pass # Replace with function body. - - -func _on_testrooms_pressed(): - pass # Replace with function body. - - -func _on_friendly_challenge_pressed(): - pass # Replace with function body. - - -func _on_school_nursery_pressed(): - pass # Replace with function body. - - -func _on_overworld_ceres_pressed(): - pass # Replace with function body. - - -func _on_boss_fight_ceres_pressed(): - pass # Replace with function body. - - -func _on_overworld_earth_pressed(): - pass # Replace with function body. - - -func _on_the_zubmarine_zone_pressed(): - pass # Replace with function body. - - -func _on_radioactive_desert_pressed(): - pass # Replace with function body. - - -func _on_boss_fight_earth_pressed(): - pass # Replace with function body. - - -func _on_dungeon_of_destruction_pressed(): - pass # Replace with function body. - - -func _on_final_boss_fight_pressed(): - pass # Replace with function body. - - -func _on_ending_theme_pressed(): - pass # Replace with function body. +func _on_sfx_pressed(): + get_tree().change_scene_to_file("res://levels/sfxtest.tscn") diff --git a/levels/soundtest.tscn b/levels/soundtest.tscn index eb90a28..42bd999 100644 --- a/levels/soundtest.tscn +++ b/levels/soundtest.tscn @@ -1,16 +1,17 @@ -[gd_scene load_steps=7 format=3 uid="uid://chg6qe1fijkh3"] +[gd_scene load_steps=8 format=3 uid="uid://chg6qe1fijkh3"] [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_2a53a"] -[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,157 +41,41 @@ 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="BoxContainer" type="BoxContainer" parent="."] +[node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 1 -anchors_preset = 3 -anchor_left = 1.0 +anchors_preset = 7 +anchor_left = 0.5 anchor_top = 1.0 -anchor_right = 1.0 +anchor_right = 0.5 anchor_bottom = 1.0 -offset_left = -640.0 -offset_top = -419.0 -grow_horizontal = 0 +offset_left = -129.5 +offset_top = -362.0 +offset_right = 129.5 +grow_horizontal = 2 grow_vertical = 0 -[node name="VBoxContainer" type="VBoxContainer" parent="BoxContainer"] +[node name="Music" type="Button" parent="VBoxContainer"] layout_mode = 2 +theme_override_font_sizes/font_size = 80 +theme_override_styles/focus = SubResource("StyleBoxFlat_wtbgt") +text = "Music" -[node name="Title Screen" type="Button" parent="BoxContainer/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 = "Title Screen: X-Force Theme" +theme_override_font_sizes/font_size = 80 +theme_override_styles/focus = SubResource("StyleBoxFlat_4arqn") +text = "Sound Effects" -[node name="Disclaimer, Settings, Stores" type="Button" parent="BoxContainer/VBoxContainer"] +[node name="Back" type="Button" parent="VBoxContainer"] layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_cprm3") -text = "Disclaimer, Settings, Stores" - -[node name="Testrooms" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Testrooms" - -[node name="Friendly challenge" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Friendly challenge" - -[node name="School nursery" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "School nursery" - -[node name="Overworld (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Overworld (Ceres)" - -[node name="Boss fight (Ceres)" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Boss fight (Ceres)" - -[node name="Overworld (Earth)" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Overworld (Earth)" - -[node name="The Zubmarine Zone" type="Button" parent="BoxContainer/VBoxContainer"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "The Zubmarine Zone" - -[node name="VBoxContainer2" type="VBoxContainer" parent="BoxContainer"] -layout_mode = 2 - -[node name="Radioactive Desert" type="Button" parent="BoxContainer/VBoxContainer2"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Radioactive Desert" - -[node name="Boss Fight (Earth)" type="Button" parent="BoxContainer/VBoxContainer2"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Boss Fight (Earth)" - -[node name="Dungeon of Destruction" type="Button" parent="BoxContainer/VBoxContainer2"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Dungeon of Destruction" - -[node name="Final Boss Fight" type="Button" parent="BoxContainer/VBoxContainer2"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Final Boss Fight" - -[node name="Ending Theme" type="Button" parent="BoxContainer/VBoxContainer2"] -layout_mode = 2 -theme_override_font_sizes/font_size = 25 -theme_override_styles/focus = SubResource("StyleBoxFlat_alctd") -text = "Ending Theme" - -[node name="Credits 1" type="Button" parent="BoxContainer/VBoxContainer2"] -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="BoxContainer/VBoxContainer2"] -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="BoxContainer/VBoxContainer2"] -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="BoxContainer/VBoxContainer2"] -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_2a53a")] +layout_mode = 1 + [connection signal="finished" from="nebula" to="nebula" method="_on_finished"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Title Screen" to="." method="_on_title_screen_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Disclaimer, Settings, Stores" to="." method="_on_disclaimer_settings_stores_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Testrooms" to="." method="_on_testrooms_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Friendly challenge" to="." method="_on_friendly_challenge_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/School nursery" to="." method="_on_school_nursery_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Ceres)" to="." method="_on_overworld_ceres_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Boss fight (Ceres)" to="." method="_on_boss_fight_ceres_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/Overworld (Earth)" to="." method="_on_overworld_earth_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer/The Zubmarine Zone" to="." method="_on_the_zubmarine_zone_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Radioactive Desert" to="." method="_on_radioactive_desert_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Boss Fight (Earth)" to="." method="_on_boss_fight_earth_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Dungeon of Destruction" to="." method="_on_dungeon_of_destruction_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Final Boss Fight" to="." method="_on_final_boss_fight_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Ending Theme" to="." method="_on_ending_theme_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 1" to="." method="_on_credits_1_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 2" to="." method="_on_credits_2_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Credits 3" to="." method="_on_credits_3_pressed"] -[connection signal="pressed" from="BoxContainer/VBoxContainer2/Back" to="." method="_on_back_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"] diff --git a/levels/tmenu.gd b/levels/tmenu.gd index 8fe0de2..16fadbe 100644 --- a/levels/tmenu.gd +++ b/levels/tmenu.gd @@ -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. diff --git a/levels/tmenu.tscn b/levels/tmenu.tscn index 81677fd..29180a2 100644 --- a/levels/tmenu.tscn +++ b/levels/tmenu.tscn @@ -1,8 +1,9 @@ -[gd_scene load_steps=7 format=3 uid="uid://s8ttuboef06k"] +[gd_scene load_steps=8 format=3 uid="uid://s8ttuboef06k"] [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_0qcfw"] [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_0qcfw")] +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"] diff --git a/bootclick.gd b/main.gd similarity index 81% rename from bootclick.gd rename to main.gd index b2e8878..29b3439 100644 --- a/bootclick.gd +++ b/main.gd @@ -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() diff --git a/main.tscn b/main.tscn new file mode 100644 index 0000000..4044094 --- /dev/null +++ b/main.tscn @@ -0,0 +1,35 @@ +[gd_scene load_steps=4 format=3 uid="uid://d0jrygo3ihcdk"] + +[ext_resource type="Script" path="res://main.gd" id="1_51vn3"] +[ext_resource type="PackedScene" path="res://selftest.tscn" id="2_jnmxu"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="3_tig2r"] + +[node name="Main" 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_51vn3") + +[node name="Label" type="Label" parent="."] +layout_mode = 0 +offset_left = 290.0 +offset_top = 258.0 +offset_right = 949.0 +offset_bottom = 326.0 +theme_override_font_sizes/font_size = 49 +text = "Press enter or B to continue" +horizontal_alignment = 1 +vertical_alignment = 1 + +[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_tig2r")] +layout_mode = 1 diff --git a/project.godot b/project.godot index 9dc41f4..4b70281 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Midori in the Magic School" -run/main_scene="res://bootclick.tscn" +run/main_scene="res://main.tscn" config/features=PackedStringArray("4.2", "GL Compatibility") config/icon="res://icon.png" diff --git a/title.gd b/title.gd index 7397096..3127ff2 100644 --- a/title.gd +++ b/title.gd @@ -13,7 +13,7 @@ func _ready(): Global.sk = true Global.gamelevel = null add_child(bgsound) - var titlemusic = load("res://music/reloaded.wav") + var titlemusic = load(Global.musictracks[0]) bgsound.stream = titlemusic bgsound.play(0) wait = Time.get_ticks_msec() @@ -26,11 +26,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(): diff --git a/title.tscn b/title.tscn index dda543c..023096e 100644 --- a/title.tscn +++ b/title.tscn @@ -6,7 +6,7 @@ [ext_resource type="Script" path="res://nebula.gd" id="3_bn1r3"] [ext_resource type="Script" path="res://start.gd" id="4_cc41w"] [ext_resource type="Script" path="res://exit.gd" id="5_scoec"] -[ext_resource type="PackedScene" uid="uid://wovn8m050haq" path="res://levels/bottomhud.tscn" id="7_yq7ke"] +[ext_resource type="PackedScene" uid="uid://d31udhuuwrajn" path="res://levels/bottomhud.tscn" id="7_yq7ke"] [node name="title" type="Control"] layout_mode = 3