From 2f18454a65759810c9af5d44934c0f5e595d9521 Mon Sep 17 00:00:00 2001 From: yuki Date: Tue, 25 Nov 2025 17:55:50 -0300 Subject: [PATCH] add game started signal --- scenes/autoload/event_bus.gd | 5 ++++- scenes/autoload/game_director.gd | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/scenes/autoload/event_bus.gd b/scenes/autoload/event_bus.gd index 34c8d12..92715b3 100644 --- a/scenes/autoload/event_bus.gd +++ b/scenes/autoload/event_bus.gd @@ -1,7 +1,10 @@ +@warning_ignore_start("unused_signal") extends Node -@warning_ignore_start("unused_signal") +## Emitted when the game starts. +signal game_started() + ## Emitted when the room has transitioned. signal room_changed(previous_room: StringName, next_room: StringName, waypoint: Waypoint) diff --git a/scenes/autoload/game_director.gd b/scenes/autoload/game_director.gd index bb08c71..c5f276f 100644 --- a/scenes/autoload/game_director.gd +++ b/scenes/autoload/game_director.gd @@ -4,6 +4,7 @@ extends Node func start_game() -> void: print("starting game") get_tree().change_scene_to_file("res://scenes/worlds/yukotsukis_room/yukotsukis_room.tscn") + EventBus.game_started.emit() func goto_room(previous_room: Room, waypoint: RemoteWaypoint, config: RoomConfig = null) -> void: