Compare commits

...

3 commits

5 changed files with 15 additions and 2 deletions

1
.gitignore vendored
View file

@ -2,3 +2,4 @@
.godot/
/android/
addons/godot-git-plugin
addons/script-ide

View file

@ -15,7 +15,7 @@ func _ready() -> void:
assert(level != null, "The LevelCamera type must be used only in the level scene. It needs the owner to be a Level node.")
func _physics_process(delta: float) -> void:
func follow_gameplay(delta: float) -> void:
var total_weight: float = ball_weight + player_weight * 2.0
target_pos = (
level.ball.global_position * ball_weight +

View 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})

View file

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

View file

@ -1,6 +1,6 @@
[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"]
script = ExtResource("1_4q8ux")