From 34eb42616d60482049024937de17311d22e9d72f Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Fri, 16 May 2025 22:13:34 +1000 Subject: [PATCH] =?UTF-8?q?wea=20re=20cooking=20=F0=9F=94=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- base modules/channel_controller.gd | 13 +-- game_logic.gd | 24 +++- game_manager.gd | 8 ++ game_scene.tscn | 5 +- games/asteroids/asteroids.gd | 13 +++ games/asteroids/asteroids.gd.uid | 1 + games/asteroids/asteroids.tscn | 4 +- games/bomb defusal/bomb_defusal.gd | 6 + games/bullet_hell/bullet_hell.gd | 13 +++ games/bullet_hell/bullet_hell.gd.uid | 1 + games/bullet_hell/bullet_hell.tscn | 4 +- games/crafting/crafting.gd | 4 + games/ddr/ddr.gd | 2 + games/platformer/platformer.gd | 29 +++++ games/platformer/platformer.gd.uid | 1 + games/platformer/platformer.tscn | 128 ++++++++++++--------- games/platformer/platformer_channel.gd | 7 +- games/reaction/reaction.gd | 3 + games/space invaders/space_invaders.gd | 13 +++ games/space invaders/space_invaders.gd.uid | 1 + games/space invaders/space_invaders.tscn | 4 +- menu/menu.gd | 21 ++++ menu/menu.gd.uid | 1 + menu/menu.tscn | 16 ++- project.godot | 2 +- 25 files changed, 247 insertions(+), 77 deletions(-) create mode 100644 games/asteroids/asteroids.gd create mode 100644 games/asteroids/asteroids.gd.uid create mode 100644 games/bullet_hell/bullet_hell.gd create mode 100644 games/bullet_hell/bullet_hell.gd.uid create mode 100644 games/platformer/platformer.gd create mode 100644 games/platformer/platformer.gd.uid create mode 100644 games/space invaders/space_invaders.gd create mode 100644 games/space invaders/space_invaders.gd.uid create mode 100644 menu/menu.gd create mode 100644 menu/menu.gd.uid diff --git a/base modules/channel_controller.gd b/base modules/channel_controller.gd index af4a20e..b0c2065 100644 --- a/base modules/channel_controller.gd +++ b/base modules/channel_controller.gd @@ -1,8 +1,7 @@ extends Control class_name Channel -signal channel_win -signal channel_lose + enum Mode{ Online, @@ -34,12 +33,12 @@ func _process(delta: float) -> void: static_channel_cover.visible = channel_mode == Mode.Static func start_channel(): - var new_scene = channel_scene.instantiate() - game_viewport.add_child(new_scene) - channel_mode = Mode.Online + start_specific_channel(channel_scene) func start_specific_channel(scene : PackedScene): var new_scene = scene.instantiate() + new_scene.game_win.connect(win_channel) + new_scene.game_lose.connect(lose_channel) game_viewport.add_child(new_scene) channel_mode = Mode.Online @@ -54,9 +53,9 @@ func make_offline(): channel_mode = Mode.Offline func win_channel(): - channel_win.emit() + GameManager.channel_win.emit() end_channel() func lose_channel(): - channel_lose.emit() + GameManager.channel_lose.emit() end_channel() diff --git a/game_logic.gd b/game_logic.gd index d93a746..0ea937d 100644 --- a/game_logic.gd +++ b/game_logic.gd @@ -7,6 +7,8 @@ enum Gamemode{ #mode settings +signal game_over(score : int) + @export var max_lives = 3 @export var lives = 3 @export var platformer_game : PackedScene @@ -23,15 +25,21 @@ enum Gamemode{ var gamemode : Gamemode = Gamemode.Story #will be set by manager/menu option var zooming_out : bool = false var gameplay : bool = false # becomes true when the game starts +var score : int = 0 # Called when the node enters the scene tree for the first time. func _ready() -> void: GameManager.zoom_out_signal.connect(zoom_out) GameManager.prepare.connect(get_ready) GameManager.gaming.connect(start_game) + GameManager.channel_win.connect(rec_channel_win) + GameManager.channel_lose.connect(rec_channel_lose) if(gamemode == Gamemode.Story): main_camera.zoom = Vector2(3.1,3.1) main_channel.start_specific_channel(platformer_game) + if(GameManager.are_we_skipping_intro): + main_camera.zoom = Vector2(1,1) + GameManager.skip_intro.emit() # Called every frame. 'delta' is the elapsed time since the previous frame. @@ -69,7 +77,19 @@ func game_loop(delta : float): else: offline_channels.append(channel) # if i need to switch a channel online, then pick one and run tis start channel method - print("Online Channels: " + str(online_channels.size())) + #print("Online Channels: " + str(online_channels.size())) if(online_channels.size() < target_channels and offline_channels.size() > 0): var random_channel_number = randi_range(0, offline_channels.size()-1) - offline_channels[random_channel_number].start_channel() + var random_game = randi_range(0, games.size()-1) + #offline_channels[random_channel_number].start_channel() + offline_channels[random_channel_number].start_specific_channel(games[random_game]) + +func rec_channel_win(): + score += 1 + GameManager.send_update_data(score, lives) + +func rec_channel_lose(): + lives -= 1 + GameManager.send_update_data(score, lives) + if(lives <= 0): + game_over.emit() diff --git a/game_manager.gd b/game_manager.gd index e358645..df1fc42 100644 --- a/game_manager.gd +++ b/game_manager.gd @@ -8,8 +8,13 @@ signal show_chat_signal(String) signal show_item_signal(String, Texture) signal prepare signal gaming +signal channel_win +signal channel_lose +signal update_data(score : int, lives : int) +signal skip_intro @export var broken_tv_remote : Texture +var are_we_skipping_intro : bool = false # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -42,3 +47,6 @@ func prepare_for_gaming(): func actually_gaming(): gaming.emit() + +func send_update_data(score : int, lives: int): + update_data.emit(score, lives) diff --git a/game_scene.tscn b/game_scene.tscn index 1591908..2febca4 100644 --- a/game_scene.tscn +++ b/game_scene.tscn @@ -1,8 +1,7 @@ -[gd_scene load_steps=16 format=3 uid="uid://ct8axfbvd2wn4"] +[gd_scene load_steps=15 format=3 uid="uid://ct8axfbvd2wn4"] [ext_resource type="Script" uid="uid://d2q6xfk8htbyy" path="res://game_logic.gd" id="1_j5hk1"] [ext_resource type="PackedScene" uid="uid://63rik2noj8id" path="res://base modules/test_channel.tscn" id="1_mlf6e"] -[ext_resource type="PackedScene" uid="uid://ch1x8pfdu2b1g" path="res://test_game.tscn" id="2_mixcd"] [ext_resource type="PackedScene" uid="uid://bw1hhx7lyfonr" path="res://games/asteroids/asteroids.tscn" id="3_mj2jn"] [ext_resource type="PackedScene" uid="uid://ckbyiwy0dxbsd" path="res://games/platformer/platformer.tscn" id="4_mj2jn"] [ext_resource type="PackedScene" uid="uid://b5lh8cnwu8xhg" path="res://games/ddr/ddr.tscn" id="5_e35lh"] @@ -53,7 +52,7 @@ columns = 3 [node name="Control" parent="GridContainer" instance=ExtResource("1_mlf6e")] layout_mode = 2 -channel_scene = ExtResource("2_mixcd") +channel_scene = ExtResource("7_6e45b") [node name="Control2" parent="GridContainer" instance=ExtResource("1_mlf6e")] layout_mode = 2 diff --git a/games/asteroids/asteroids.gd b/games/asteroids/asteroids.gd new file mode 100644 index 0000000..a679519 --- /dev/null +++ b/games/asteroids/asteroids.gd @@ -0,0 +1,13 @@ +extends Node + +signal game_win +signal game_lose + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/games/asteroids/asteroids.gd.uid b/games/asteroids/asteroids.gd.uid new file mode 100644 index 0000000..93957da --- /dev/null +++ b/games/asteroids/asteroids.gd.uid @@ -0,0 +1 @@ +uid://carkc2diu0xwd diff --git a/games/asteroids/asteroids.tscn b/games/asteroids/asteroids.tscn index 26d27c8..1c212e8 100644 --- a/games/asteroids/asteroids.tscn +++ b/games/asteroids/asteroids.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=7 format=3 uid="uid://bw1hhx7lyfonr"] +[gd_scene load_steps=8 format=3 uid="uid://bw1hhx7lyfonr"] [ext_resource type="Script" uid="uid://brih2jftm2tsa" path="res://games/asteroids/ship_controller.gd" id="1_6dc0m"] +[ext_resource type="Script" uid="uid://carkc2diu0xwd" path="res://games/asteroids/asteroids.gd" id="1_j0tb1"] [ext_resource type="Texture2D" uid="uid://dqorec3q3h3pp" path="res://sprites/asteroidsShip.png" id="2_j0tb1"] [sub_resource type="Gradient" id="Gradient_6dc0m"] @@ -20,6 +21,7 @@ noise = SubResource("FastNoiseLite_j0tb1") radius = 26.0192 [node name="Asteroids" type="Node"] +script = ExtResource("1_j0tb1") [node name="TextureRect" type="TextureRect" parent="."] anchors_preset = 15 diff --git a/games/bomb defusal/bomb_defusal.gd b/games/bomb defusal/bomb_defusal.gd index e26e5ac..e20fb08 100644 --- a/games/bomb defusal/bomb_defusal.gd +++ b/games/bomb defusal/bomb_defusal.gd @@ -1,5 +1,8 @@ extends Node +signal game_win +signal game_lose + @export var code_length : int = 8 @export_group("Node References") @@ -49,7 +52,10 @@ func enter_number(number : int): pick_new_number() else: #womp womp (lose channel) + game_lose.emit() pass + if(numbers_typed >= code_length): + game_win.emit() func pick_new_number(): var new_number = current_number diff --git a/games/bullet_hell/bullet_hell.gd b/games/bullet_hell/bullet_hell.gd new file mode 100644 index 0000000..a679519 --- /dev/null +++ b/games/bullet_hell/bullet_hell.gd @@ -0,0 +1,13 @@ +extends Node + +signal game_win +signal game_lose + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/games/bullet_hell/bullet_hell.gd.uid b/games/bullet_hell/bullet_hell.gd.uid new file mode 100644 index 0000000..6698d08 --- /dev/null +++ b/games/bullet_hell/bullet_hell.gd.uid @@ -0,0 +1 @@ +uid://dld4egumb2u0o diff --git a/games/bullet_hell/bullet_hell.tscn b/games/bullet_hell/bullet_hell.tscn index afd0192..a81b09b 100644 --- a/games/bullet_hell/bullet_hell.tscn +++ b/games/bullet_hell/bullet_hell.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=7 format=3 uid="uid://cnpyrh4c6a7cg"] +[gd_scene load_steps=8 format=3 uid="uid://cnpyrh4c6a7cg"] [ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_jfgig"] +[ext_resource type="Script" uid="uid://dld4egumb2u0o" path="res://games/bullet_hell/bullet_hell.gd" id="1_uvm3w"] [ext_resource type="Script" uid="uid://c100m60xe4k3r" path="res://games/bullet_hell/bulletHellMovement.gd" id="1_x66ke"] [sub_resource type="Gradient" id="Gradient_x66ke"] @@ -18,6 +19,7 @@ noise = SubResource("FastNoiseLite_uvm3w") size = Vector2(38, 38) [node name="BulletHell" type="Node"] +script = ExtResource("1_uvm3w") [node name="TextureRect" type="TextureRect" parent="."] anchors_preset = 15 diff --git a/games/crafting/crafting.gd b/games/crafting/crafting.gd index d9ff2c9..0fcb50b 100644 --- a/games/crafting/crafting.gd +++ b/games/crafting/crafting.gd @@ -1,4 +1,8 @@ extends Node + +signal game_win +signal game_lose + @export var keys : Array[String] @export var time_limit : float = 25 diff --git a/games/ddr/ddr.gd b/games/ddr/ddr.gd index 5c9a357..06c6738 100644 --- a/games/ddr/ddr.gd +++ b/games/ddr/ddr.gd @@ -1,5 +1,7 @@ extends Node +signal game_win +signal game_lose @export var note_frequency : float = 2 @export var paths : Array[Node2D] diff --git a/games/platformer/platformer.gd b/games/platformer/platformer.gd new file mode 100644 index 0000000..f4dc65e --- /dev/null +++ b/games/platformer/platformer.gd @@ -0,0 +1,29 @@ +extends Node + +signal game_win +signal game_lose + +@export_group("Node References") +@export var score_label : Label +@export var player : CharacterBody2D +@export var skip_location : Marker2D + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + GameManager.skip_intro.connect(rec_skip_intro) + GameManager.update_data.connect(update_ui) + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + +func update_ui(score : int, lives :int): + score_label.text = str(score) + +func rec_skip_intro(): + #teleport player to doorway + player.global_position = skip_location.global_position + #maybe bring up an invis wall behind them but it doesnt matter + pass diff --git a/games/platformer/platformer.gd.uid b/games/platformer/platformer.gd.uid new file mode 100644 index 0000000..b2e38ed --- /dev/null +++ b/games/platformer/platformer.gd.uid @@ -0,0 +1 @@ +uid://bs4keltwfbrrn diff --git a/games/platformer/platformer.tscn b/games/platformer/platformer.tscn index 0156977..f46d734 100644 --- a/games/platformer/platformer.tscn +++ b/games/platformer/platformer.tscn @@ -1,6 +1,7 @@ -[gd_scene load_steps=30 format=4 uid="uid://ckbyiwy0dxbsd"] +[gd_scene load_steps=32 format=4 uid="uid://ckbyiwy0dxbsd"] [ext_resource type="Script" uid="uid://dqyddqx8xm0gw" path="res://games/platformer/player.gd" id="1_1wj3w"] +[ext_resource type="Script" uid="uid://bs4keltwfbrrn" path="res://games/platformer/platformer.gd" id="1_mauky"] [ext_resource type="Texture2D" uid="uid://diilj7xuttpqu" path="res://icon.svg" id="1_oyf6i"] [ext_resource type="Texture2D" uid="uid://baf30tscdkl0i" path="res://sprites/tv_remote.png" id="2_7eu3u"] [ext_resource type="Texture2D" uid="uid://g5arxk4po7kw" path="res://sprites/platformer_lab_tile.png" id="3_84mot"] @@ -57,6 +58,57 @@ size = Vector2(20, 150) [sub_resource type="RectangleShape2D" id="RectangleShape2D_cpnel"] +[sub_resource type="Animation" id="Animation_yphhh"] +length = 0.001 +tracks/0/type = "value" +tracks/0/imported = false +tracks/0/enabled = true +tracks/0/path = NodePath("AnimationProps/TVRemote:position") +tracks/0/interp = 1 +tracks/0/loop_wrap = true +tracks/0/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [Vector2(40, 272)] +} +tracks/1/type = "value" +tracks/1/imported = false +tracks/1/enabled = true +tracks/1/path = NodePath("AnimationProps/TVRemote:frame") +tracks/1/interp = 1 +tracks/1/loop_wrap = true +tracks/1/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [1] +} +tracks/2/type = "value" +tracks/2/imported = false +tracks/2/enabled = true +tracks/2/path = NodePath("AnimationProps/TVRemote:rotation") +tracks/2/interp = 1 +tracks/2/loop_wrap = true +tracks/2/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 0, +"values": [0.0] +} +tracks/3/type = "value" +tracks/3/imported = false +tracks/3/enabled = true +tracks/3/path = NodePath("AnimationProps/TVRemote:visible") +tracks/3/interp = 1 +tracks/3/loop_wrap = true +tracks/3/keys = { +"times": PackedFloat32Array(0), +"transitions": PackedFloat32Array(1), +"update": 1, +"values": [false] +} + [sub_resource type="Animation" id="Animation_7gl5q"] resource_name = "trip" length = 0.8 @@ -109,57 +161,6 @@ tracks/3/keys = { "values": [false, true] } -[sub_resource type="Animation" id="Animation_yphhh"] -length = 0.001 -tracks/0/type = "value" -tracks/0/imported = false -tracks/0/enabled = true -tracks/0/path = NodePath("AnimationProps/TVRemote:position") -tracks/0/interp = 1 -tracks/0/loop_wrap = true -tracks/0/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [Vector2(40, 272)] -} -tracks/1/type = "value" -tracks/1/imported = false -tracks/1/enabled = true -tracks/1/path = NodePath("AnimationProps/TVRemote:frame") -tracks/1/interp = 1 -tracks/1/loop_wrap = true -tracks/1/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [1] -} -tracks/2/type = "value" -tracks/2/imported = false -tracks/2/enabled = true -tracks/2/path = NodePath("AnimationProps/TVRemote:rotation") -tracks/2/interp = 1 -tracks/2/loop_wrap = true -tracks/2/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 0, -"values": [0.0] -} -tracks/3/type = "value" -tracks/3/imported = false -tracks/3/enabled = true -tracks/3/path = NodePath("AnimationProps/TVRemote:visible") -tracks/3/interp = 1 -tracks/3/loop_wrap = true -tracks/3/keys = { -"times": PackedFloat32Array(0), -"transitions": PackedFloat32Array(1), -"update": 1, -"values": [false] -} - [sub_resource type="AnimationLibrary" id="AnimationLibrary_mauky"] _data = { &"RESET": SubResource("Animation_yphhh"), @@ -180,7 +181,15 @@ animations = [{ "speed": 5.0 }] -[node name="Platformer" type="Node"] +[sub_resource type="LabelSettings" id="LabelSettings_yphhh"] +font_size = 86 +font_color = Color(1, 1, 1, 0.439216) + +[node name="Platformer" type="Node" node_paths=PackedStringArray("score_label", "player", "skip_location")] +script = ExtResource("1_mauky") +score_label = NodePath("Score") +player = NodePath("Player") +skip_location = NodePath("IntroSkipLocation") [node name="Parallax2D" type="Parallax2D" parent="."] scroll_scale = Vector2(0, 0) @@ -306,8 +315,21 @@ move_speed = 1000.0 position = Vector2(624, 152) open_pos_y = 152.0 close_pos_y = 240.0 +open = false move_speed = 1000.0 +[node name="Score" type="Label" parent="."] +offset_left = 208.0 +offset_top = 160.0 +offset_right = 432.0 +offset_bottom = 279.0 +text = "00" +label_settings = SubResource("LabelSettings_yphhh") +horizontal_alignment = 1 + +[node name="IntroSkipLocation" type="Marker2D" parent="."] +position = Vector2(-40, 256) + [connection signal="area_entered" from="Player/hitbox" to="Player" method="_on_hitbox_area_entered"] [connection signal="area_entered" from="TheBitWhereYouTrip" to="TripAnimation" method="_on_the_bit_where_you_trip_area_entered"] [connection signal="area_entered" from="BrokenRemote" to="AnimationProps/TVRemote" method="_on_broken_remote_area_entered"] diff --git a/games/platformer/platformer_channel.gd b/games/platformer/platformer_channel.gd index ac5bdae..2028ac2 100644 --- a/games/platformer/platformer_channel.gd +++ b/games/platformer/platformer_channel.gd @@ -6,16 +6,17 @@ func _process(delta: float) -> void: func start_specific_channel(scene : PackedScene): var new_scene = scene.instantiate() + new_scene.game_win.connect(win_channel) + new_scene.game_lose.connect(lose_channel) game_viewport.add_child(new_scene) channel_mode = Mode.Online func start_channel(): - var new_scene = channel_scene.instantiate() - game_viewport.add_child(new_scene) - channel_mode = Mode.Online + start_specific_channel(channel_scene) func end_channel(): channel_mode = Mode.Static modulate = Color.DIM_GRAY # TODO: a bunch of stuff here + ## bro what did you mean when you meant this T_T #game_viewport.get_child(0).queue_free() diff --git a/games/reaction/reaction.gd b/games/reaction/reaction.gd index 78aa65c..7564db6 100644 --- a/games/reaction/reaction.gd +++ b/games/reaction/reaction.gd @@ -1,5 +1,8 @@ extends Node +signal game_win +signal game_lose + @export var reaction_window : float = 1 @export_group("Node References") @export var prepare_node : Control diff --git a/games/space invaders/space_invaders.gd b/games/space invaders/space_invaders.gd new file mode 100644 index 0000000..a679519 --- /dev/null +++ b/games/space invaders/space_invaders.gd @@ -0,0 +1,13 @@ +extends Node + +signal game_win +signal game_lose + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass diff --git a/games/space invaders/space_invaders.gd.uid b/games/space invaders/space_invaders.gd.uid new file mode 100644 index 0000000..0f8e74f --- /dev/null +++ b/games/space invaders/space_invaders.gd.uid @@ -0,0 +1 @@ +uid://0v0y62pyhpq4 diff --git a/games/space invaders/space_invaders.tscn b/games/space invaders/space_invaders.tscn index 0af3dd9..fd460e8 100644 --- a/games/space invaders/space_invaders.tscn +++ b/games/space invaders/space_invaders.tscn @@ -1,7 +1,8 @@ -[gd_scene load_steps=9 format=3 uid="uid://bkabgl6p44c5b"] +[gd_scene load_steps=10 format=3 uid="uid://bkabgl6p44c5b"] [ext_resource type="Texture2D" uid="uid://dqorec3q3h3pp" path="res://sprites/asteroidsShip.png" id="1_8m3yy"] [ext_resource type="Script" uid="uid://c1e46eu5tbni0" path="res://games/space invaders/ship.gd" id="1_jsxp6"] +[ext_resource type="Script" uid="uid://0v0y62pyhpq4" path="res://games/space invaders/space_invaders.gd" id="1_k5cbn"] [ext_resource type="Texture2D" uid="uid://by327tfhk6xrs" path="res://sprites/invadersBarrier.png" id="2_jsxp6"] [sub_resource type="Gradient" id="Gradient_4laqq"] @@ -24,6 +25,7 @@ radius = 24.1868 size = Vector2(56, 28) [node name="SpaceInvaders" type="Node"] +script = ExtResource("1_k5cbn") [node name="TextureRect" type="TextureRect" parent="."] anchors_preset = 15 diff --git a/menu/menu.gd b/menu/menu.gd new file mode 100644 index 0000000..04a9d8f --- /dev/null +++ b/menu/menu.gd @@ -0,0 +1,21 @@ +extends Control + + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + pass + + +func _on_intro_button_pressed() -> void: + GameManager.are_we_skipping_intro = false + get_tree().change_scene_to_file("res://game_scene.tscn") + + +func _on_skip_button_pressed() -> void: + GameManager.are_we_skipping_intro = true + get_tree().change_scene_to_file("res://game_scene.tscn") diff --git a/menu/menu.gd.uid b/menu/menu.gd.uid new file mode 100644 index 0000000..ab6cf39 --- /dev/null +++ b/menu/menu.gd.uid @@ -0,0 +1 @@ +uid://bjkqa4cowhacd diff --git a/menu/menu.tscn b/menu/menu.tscn index 80cc3d0..fb4125f 100644 --- a/menu/menu.tscn +++ b/menu/menu.tscn @@ -1,4 +1,6 @@ -[gd_scene load_steps=3 format=3 uid="uid://0ajx46iu2l51"] +[gd_scene load_steps=4 format=3 uid="uid://0ajx46iu2l51"] + +[ext_resource type="Script" uid="uid://bjkqa4cowhacd" path="res://menu/menu.gd" id="1_j0t7f"] [sub_resource type="Gradient" id="Gradient_jc4t8"] interpolation_color_space = 2 @@ -21,6 +23,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 +script = ExtResource("1_j0t7f") [node name="TextureRect" type="TextureRect" parent="."] layout_mode = 0 @@ -65,15 +68,15 @@ fit_content = true autowrap_mode = 0 horizontal_alignment = 1 -[node name="StoryButton" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] +[node name="IntroButton" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] modulate = Color(1, 0.403922, 1, 1) layout_mode = 2 -text = "Play Story" +text = "Play Intro" -[node name="EndlessButton" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] +[node name="SkipButton" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] modulate = Color(1, 0.403922, 1, 1) layout_mode = 2 -text = "Play Endless" +text = "Skip Intro" [node name="CreditsButton" type="Button" parent="CenterContainer/PanelContainer/MarginContainer/VBoxContainer"] modulate = Color(0.388235, 1, 1, 1) @@ -84,3 +87,6 @@ text = "Credits" modulate = Color(1, 0.346577, 0.280009, 1) layout_mode = 2 text = "Exit Game" + +[connection signal="pressed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/IntroButton" to="." method="_on_intro_button_pressed"] +[connection signal="pressed" from="CenterContainer/PanelContainer/MarginContainer/VBoxContainer/SkipButton" to="." method="_on_skip_button_pressed"] diff --git a/project.godot b/project.godot index af9caa9..4457e87 100644 --- a/project.godot +++ b/project.godot @@ -11,7 +11,7 @@ config_version=5 [application] config/name="Alternate - Playmakers Jam" -run/main_scene="uid://ct8axfbvd2wn4" +run/main_scene="uid://0ajx46iu2l51" config/features=PackedStringArray("4.4", "GL Compatibility") config/icon="res://icon.svg"