[gd_scene load_steps=12 format=3 uid="uid://jx8hrj6k1ju8"] [ext_resource type="PackedScene" uid="uid://d1ugwu6dqomtg" path="res://scene/wall.tscn" id="1_7iavl"] [ext_resource type="Theme" uid="uid://b46gto6k33wqr" path="res://assets/theme.tres" id="3_7iavl"] [ext_resource type="Script" uid="uid://dkolsh66l73k0" path="res://script/canvas_load.gd" id="3_pyuau"] [ext_resource type="PackedScene" uid="uid://b6hqwxrexoa2n" path="res://scene/spawner.tscn" id="3_ruca2"] [sub_resource type="GDScript" id="GDScript_pyuau"] script/source = "extends Button func _ready() -> void: grab_focus() func _on_pressed() -> void: GameController.emit_signal(\"start_game_one_player\") " [sub_resource type="GDScript" id="GDScript_ruca2"] script/source = "extends Button func _on_pressed() -> void: GameController.emit_signal(\"start_game_two_player\") " [sub_resource type="GDScript" id="GDScript_7iavl"] script/source = "extends Button func _on_pressed() -> void: get_tree().quit() " [sub_resource type="GDScript" id="GDScript_dogtj"] script/source = "extends Label func _ready() -> void: text = GameController.get_scoreboard_singleplayer(5) " [sub_resource type="GDScript" id="GDScript_u3kfb"] script/source = "extends Label func _ready() -> void: text = GameController.get_scoreboard_multiplayer(5) " [sub_resource type="GDScript" id="GDScript_mjrrj"] script/source = "extends ScrollContainer var speed_scrool = 0.2 @export var delay := 0.0 func _process(delta: float) -> void: if visible: delay += delta if delay >= speed_scrool: if Input.is_action_pressed(\"down\"): scroll_vertical += 20 delay = 0 elif Input.is_action_pressed(\"up\"): scroll_vertical -= 20 delay = 0 " [sub_resource type="GDScript" id="GDScript_8llpu"] script/source = "extends Label func _ready() -> void: text = GameController.get_scoreboard_singleplayer() " [node name="load_screen" type="Node2D"] [node name="wall" parent="." node_paths=PackedStringArray("spawner") instance=ExtResource("1_7iavl")] spawner = NodePath("../spawner") [node name="Camera2D" type="Camera2D" parent="."] [node name="spawner" parent="." node_paths=PackedStringArray("player") instance=ExtResource("3_ruca2")] player = NodePath("../CharacterBody2D") distance = 500.0 delay_spawn = 0.5 load_screen = true [node name="CharacterBody2D" type="CharacterBody2D" parent="."] [node name="CanvasLayer" type="CanvasLayer" parent="."] script = ExtResource("3_pyuau") [node name="Control" type="Control" parent="CanvasLayer"] custom_minimum_size = Vector2(640, 640) layout_mode = 3 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control"] layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -119.5 offset_top = -127.0 offset_right = 119.5 offset_bottom = 127.0 grow_horizontal = 2 grow_vertical = 2 theme = ExtResource("3_7iavl") theme_override_constants/separation = 64 [node name="Label" type="Label" parent="CanvasLayer/Control/VBoxContainer"] layout_mode = 2 text = "Azzteroid" horizontal_alignment = 1 [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/Control/VBoxContainer"] layout_mode = 2 theme_override_constants/separation = 64 [node name="buttons" type="VBoxContainer" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer"] layout_mode = 2 alignment = 1 [node name="1" type="Button" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons"] layout_mode = 2 focus_next = NodePath("../2") focus_previous = NodePath("../exit") theme = ExtResource("3_7iavl") text = "1 Player" script = SubResource("GDScript_pyuau") [node name="2" type="Button" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons"] layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 focus_next = NodePath("../exit") focus_previous = NodePath("../1") theme = ExtResource("3_7iavl") text = "2 Players" script = SubResource("GDScript_ruca2") [node name="scores" type="Button" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons"] layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 focus_next = NodePath("../exit") focus_previous = NodePath("../1") theme = ExtResource("3_7iavl") text = "Scores" [node name="exit" type="Button" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons"] layout_mode = 2 size_flags_horizontal = 4 size_flags_vertical = 0 focus_next = NodePath("../1") focus_previous = NodePath("../2") theme = ExtResource("3_7iavl") text = "Exit" script = SubResource("GDScript_7iavl") [node name="scores" type="VBoxContainer" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer"] layout_mode = 2 theme = ExtResource("3_7iavl") theme_override_constants/separation = 64 [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores"] layout_mode = 2 theme_override_constants/separation = 15 [node name="1player" type="Label" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores/VBoxContainer"] layout_mode = 2 text = "1 Player" horizontal_alignment = 1 [node name="1pscore" type="Label" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores/VBoxContainer"] custom_minimum_size = Vector2(200, 0) layout_mode = 2 theme = ExtResource("3_7iavl") theme_override_font_sizes/font_size = 16 horizontal_alignment = 1 autowrap_mode = 1 script = SubResource("GDScript_dogtj") [node name="VBoxContainer2" type="VBoxContainer" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores"] layout_mode = 2 theme_override_constants/separation = 15 [node name="2player" type="Label" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores/VBoxContainer2"] layout_mode = 2 text = "2 Player" horizontal_alignment = 1 [node name="2pscore" type="Label" parent="CanvasLayer/Control/VBoxContainer/HBoxContainer/scores/VBoxContainer2"] custom_minimum_size = Vector2(200, 0) layout_mode = 2 theme = ExtResource("3_7iavl") theme_override_font_sizes/font_size = 16 horizontal_alignment = 1 autowrap_mode = 1 script = SubResource("GDScript_u3kfb") [node name="Control" type="Control" parent="CanvasLayer/Control"] visible = false layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 [node name="ScrollContainer" type="ScrollContainer" parent="CanvasLayer/Control/Control"] custom_minimum_size = Vector2(500, 500) layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 offset_left = -318.0 offset_top = -250.0 offset_right = 318.0 offset_bottom = 250.0 grow_horizontal = 2 grow_vertical = 2 focus_next = NodePath(".") focus_previous = NodePath(".") theme = ExtResource("3_7iavl") horizontal_scroll_mode = 0 script = SubResource("GDScript_mjrrj") [node name="HBoxContainer" type="HBoxContainer" parent="CanvasLayer/Control/Control/ScrollContainer"] layout_mode = 2 size_flags_horizontal = 6 size_flags_vertical = 4 theme = ExtResource("3_7iavl") theme_override_constants/separation = 16 [node name="VBoxContainer" type="VBoxContainer" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer"] layout_mode = 2 [node name="1player" type="Label" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer/VBoxContainer"] custom_minimum_size = Vector2(300, 0) layout_mode = 2 theme = ExtResource("3_7iavl") text = "1 Player" horizontal_alignment = 1 [node name="Label" type="Label" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer/VBoxContainer"] custom_minimum_size = Vector2(280, 0) layout_mode = 2 size_flags_vertical = 0 theme = ExtResource("3_7iavl") theme_override_font_sizes/font_size = 16 horizontal_alignment = 1 autowrap_mode = 1 script = SubResource("GDScript_8llpu") [node name="VBoxContainer2" type="VBoxContainer" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer"] layout_mode = 2 [node name="2player" type="Label" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer/VBoxContainer2"] custom_minimum_size = Vector2(300, 0) layout_mode = 2 theme = ExtResource("3_7iavl") text = "2 Player" horizontal_alignment = 1 [node name="2pscore" type="Label" parent="CanvasLayer/Control/Control/ScrollContainer/HBoxContainer/VBoxContainer2"] custom_minimum_size = Vector2(200, 0) layout_mode = 2 theme = ExtResource("3_7iavl") theme_override_font_sizes/font_size = 16 horizontal_alignment = 1 autowrap_mode = 1 script = SubResource("GDScript_u3kfb") [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/1" to="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/1" method="_on_pressed"] [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/2" to="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/2" method="_on_pressed"] [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/scores" to="CanvasLayer" method="_on_scores_pressed"] [connection signal="pressed" from="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/exit" to="CanvasLayer/Control/VBoxContainer/HBoxContainer/buttons/exit" method="_on_pressed"]