add basic level director
This commit is contained in:
parent
1174518359
commit
a42a258f08
3 changed files with 41 additions and 0 deletions
33
classes/state/level_state.gd
Normal file
33
classes/state/level_state.gd
Normal 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
|
||||
1
classes/state/level_state.gd.uid
Normal file
1
classes/state/level_state.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://dioh6egp2x760
|
||||
7
scenes/level_director/level_director.tscn
Normal file
7
scenes/level_director/level_director.tscn
Normal 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"
|
||||
Loading…
Add table
Reference in a new issue