null ball on level start
This commit is contained in:
parent
4fe3d252b5
commit
aaa2d76d37
1 changed files with 7 additions and 3 deletions
|
|
@ -30,6 +30,12 @@ func _enter(_previous_state_path: String, _data: Dictionary = {"round": 0, "rest
|
||||||
level.player_1.queue_free()
|
level.player_1.queue_free()
|
||||||
level.player_2.queue_free()
|
level.player_2.queue_free()
|
||||||
|
|
||||||
|
if level.ball != null:
|
||||||
|
level.ball.queue_free()
|
||||||
|
|
||||||
|
assert(level.player_1 == null and level.player_2 == null, "players werent nulled")
|
||||||
|
assert(level.ball == null, "ball wasnt nulled")
|
||||||
|
|
||||||
level.current_round += 1
|
level.current_round += 1
|
||||||
|
|
||||||
if level.current_round == 4:
|
if level.current_round == 4:
|
||||||
|
|
@ -81,8 +87,6 @@ func _trans_zoom_out(pos: Vector2, zoom_in: Vector2, duration: float = 1) -> voi
|
||||||
level.camera.zoom = zoom_in
|
level.camera.zoom = zoom_in
|
||||||
trans_tween.tween_property(level.camera, "zoom", Vector2(1,1), duration).set_trans(Tween.TRANS_BOUNCE).set_ease(Tween.EASE_OUT)
|
trans_tween.tween_property(level.camera, "zoom", Vector2(1,1), duration).set_trans(Tween.TRANS_BOUNCE).set_ease(Tween.EASE_OUT)
|
||||||
trans_tween.tween_callback(func() -> void:
|
trans_tween.tween_callback(func() -> void:
|
||||||
# TODO: PLAYING state
|
finished.emit(PLAYING)
|
||||||
#finished.emit(PLAYING)
|
|
||||||
get_tree().paused = false
|
|
||||||
trans_tween = null
|
trans_tween = null
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue