mirror of
https://github.com/Steffo99/pineapple-surf.git
synced 2024-11-21 23:34:21 +00:00
Bail on plant()
and complete()
if already in that state
This commit is contained in:
parent
49eea77cdb
commit
4c031db83d
1 changed files with 6 additions and 4 deletions
|
@ -10,13 +10,15 @@ signal on_complete()
|
||||||
|
|
||||||
|
|
||||||
func plant():
|
func plant():
|
||||||
growth_timer.start()
|
if growth_timer.is_stopped():
|
||||||
emit_signal("on_planted")
|
growth_timer.start()
|
||||||
|
emit_signal("on_planted")
|
||||||
|
|
||||||
|
|
||||||
func complete():
|
func complete():
|
||||||
growth_timer.stop()
|
if not growth_timer.is_stopped():
|
||||||
emit_signal("on_complete")
|
growth_timer.stop()
|
||||||
|
emit_signal("on_complete")
|
||||||
|
|
||||||
|
|
||||||
func _process(_delta):
|
func _process(_delta):
|
||||||
|
|
Loading…
Reference in a new issue