Bug fixes: stuck ball, missing backgrounds in editor

This commit is contained in:
2024-05-06 16:04:09 +01:00
parent 031879cf46
commit 6f6b1f4b80
6 changed files with 42 additions and 25 deletions

View File

@@ -23,13 +23,15 @@ func hit() -> void:
pass
func _switch_effect(effect : int, time : int = 0) -> void:
if mode != PADDLE_NORMAL:
effect_finished.emit(mode)
if mode != effect:
if mode != PADDLE_NORMAL:
effect_finished.emit(mode)
if effect != PADDLE_NORMAL:
effect_started.emit(mode)
mode = effect
if mode != PADDLE_NORMAL:
effect_started.emit(mode)
if time > 0:
$EffectTimer.start(time)
if time > 0:
$EffectTimer.start(time)
else:
$EffectTimer.stop()