File tree Expand file tree Collapse file tree
game_elements/props/spawn_point/components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44class_name SpawnPoint
55extends Marker2D
66
7+ ## Emitted after the player position has been changed.
8+ ## [br][br]
9+ ## Level scenes can use this signal to behave differently depending on
10+ ## which SpawnPoint was used (or if no SpawnPoint at all was used).
11+ signal player_teleported
12+
713@export var look_at_side_on_spawn : Enums .LookAtSide = Enums .LookAtSide .UNSPECIFIED
814
915
@@ -24,3 +30,5 @@ func move_player_to_self_position(smooth_camera: bool = false) -> void:
2430
2531 if is_instance_valid (player ):
2632 player .teleport_to (self .global_position , smooth_camera , look_at_side_on_spawn )
33+
34+ player_teleported .emit ()
Original file line number Diff line number Diff line change @@ -25,8 +25,16 @@ signal cinematic_finished
2525## leave this blank.
2626@export var spawn_point_path : String
2727
28+ ## Wether to automatically start the cinematic.
29+ @export var autostart : bool = true
30+
2831
2932func _ready () -> void :
33+ if autostart :
34+ start ()
35+
36+
37+ func start () -> void :
3038 if not GameState .intro_dialogue_shown :
3139 DialogueManager .show_dialogue_balloon (dialogue , "" , [self ])
3240 await DialogueManager .dialogue_ended
You can’t perform that action at this time.
0 commit comments