1
Fork 0
mirror of https://github.com/Steffo99/pineapple-surf.git synced 2024-11-25 01:04:18 +00:00

Bail on plant() and complete() if already in that state

This commit is contained in:
Steffo 2023-01-08 00:12:24 +01:00
parent 49eea77cdb
commit 4c031db83d
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -10,13 +10,15 @@ signal on_complete()
func plant():
growth_timer.start()
emit_signal("on_planted")
if growth_timer.is_stopped():
growth_timer.start()
emit_signal("on_planted")
func complete():
growth_timer.stop()
emit_signal("on_complete")
if not growth_timer.is_stopped():
growth_timer.stop()
emit_signal("on_complete")
func _process(_delta):