null ball on level start
This commit is contained in:
parent
4fe3d252b5
commit
aaa2d76d37
1 changed files with 7 additions and 3 deletions
|
|
@ -29,6 +29,12 @@ func _enter(_previous_state_path: String, _data: Dictionary = {"round": 0, "rest
|
|||
if level.player_1 != null and level.player_2 != null:
|
||||
level.player_1.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
|
||||
|
||||
|
|
@ -81,8 +87,6 @@ func _trans_zoom_out(pos: Vector2, zoom_in: Vector2, duration: float = 1) -> voi
|
|||
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_callback(func() -> void:
|
||||
# TODO: PLAYING state
|
||||
#finished.emit(PLAYING)
|
||||
get_tree().paused = false
|
||||
finished.emit(PLAYING)
|
||||
trans_tween = null
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue