add temporary level director script
This commit is contained in:
parent
d022336dff
commit
61a0c34822
3 changed files with 13 additions and 1 deletions
11
scenes/level_director/level_director.gd
Normal file
11
scenes/level_director/level_director.gd
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
extends StateMachine
|
||||||
|
|
||||||
|
# TODO: remove this file (its for debug only)
|
||||||
|
func _ready() -> void:
|
||||||
|
assert(state != null, "initial state is null")
|
||||||
|
for state_node: State in find_children("*", "State"):
|
||||||
|
# fixes duplicate connections (not sure why)
|
||||||
|
if not state_node.finished.is_connected(_transition_to_next_state):
|
||||||
|
state_node.finished.connect(_transition_to_next_state)
|
||||||
|
await owner.ready
|
||||||
|
state.enter("", {"round": 0, "restart": false})
|
||||||
1
scenes/level_director/level_director.gd.uid
Normal file
1
scenes/level_director/level_director.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://bio2cjqps6kg1
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
[gd_scene load_steps=2 format=3 uid="uid://4eo7g5abxolw"]
|
[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"]
|
[ext_resource type="Script" uid="uid://bio2cjqps6kg1" path="res://scenes/level_director/level_director.gd" id="1_4q8ux"]
|
||||||
|
|
||||||
[node name="LevelDirector" type="Node"]
|
[node name="LevelDirector" type="Node"]
|
||||||
script = ExtResource("1_4q8ux")
|
script = ExtResource("1_4q8ux")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue