add basic level director

This commit is contained in:
yuki 2025-11-18 15:07:09 -03:00
parent 1174518359
commit a42a258f08
3 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,33 @@
class_name LevelState extends State
const PAUSED = "Paused"
const STARTING = "Starting"
const SCORING = "Scoring"
var level: Level
func _ready() -> void:
await owner.ready
level = owner as Level
assert(level != null, "The LevelState state type must be used only in the level scene. It needs the owner to be a Level node.")
func _enter(_previous_state_path: String, _data: Dictionary = {}) -> void:
pass
func _exit() -> void:
pass
func _handle_input(_event: InputEvent) -> void:
pass
func _state_update(_delta: float) -> void:
pass
func _state_physics_update(_delta: float) -> void:
pass

View file

@ -0,0 +1 @@
uid://dioh6egp2x760

View file

@ -0,0 +1,7 @@
[gd_scene load_steps=2 format=3 uid="uid://4eo7g5abxolw"]
[ext_resource type="Script" uid="uid://dqjaxgmyxq3rx" path="res://classes/state_machine/state_machine.gd" id="1_4q8ux"]
[node name="LevelDirector" type="Node"]
script = ExtResource("1_4q8ux")
metadata/_custom_type_script = "uid://dqjaxgmyxq3rx"