untitled-plant-game/Tools/WateringCan.gd

13 lines
233 B
GDScript3
Raw Normal View History

2021-12-05 19:26:10 +00:00
extends TextureButton
var watering = false
func _on_WateringCan_pressed():
watering = !watering
if watering:
2021-12-06 02:12:54 +00:00
$Timer.start(0.1)
$WaterParticles.emitting = true
2021-12-05 19:26:10 +00:00
if !watering:
$Timer.stop()
2021-12-06 02:12:54 +00:00
$WaterParticles.emitting = false
2021-12-05 19:26:10 +00:00