untitled-plant-game/Tools/WateringCan.gd
2021-12-05 20:26:10 +01:00

12 lines
225 B
GDScript

extends TextureButton
var watering = false
func _on_WateringCan_pressed():
watering = !watering
if watering:
$Timer.start(1)
$Particles2D.emitting = true
if !watering:
$Timer.stop()
$Particles2D.emitting = false