aboutsummaryrefslogtreecommitdiff
path: root/client/map/items/tomato.gd
diff options
context:
space:
mode:
authornokoe <nokoe@mailbox.org>2024-06-24 17:25:38 +0200
committernokoe <nokoe@mailbox.org>2024-06-24 17:27:05 +0200
commit971c795b02f6a8f9702fe39e489f8ee5d0ae14a7 (patch)
treedb4fa27f87994ee1472e226105a0f145c3b56f3e /client/map/items/tomato.gd
parent75293243bd7d1141714ecbe5a874fa356a6320b3 (diff)
downloadhurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar
hurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar.bz2
hurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar.zst
add interaction effects
Diffstat (limited to 'client/map/items/tomato.gd')
-rw-r--r--client/map/items/tomato.gd12
1 files changed, 12 insertions, 0 deletions
diff --git a/client/map/items/tomato.gd b/client/map/items/tomato.gd
index 989e4a54..43e2e64d 100644
--- a/client/map/items/tomato.gd
+++ b/client/map/items/tomato.gd
@@ -16,6 +16,18 @@
class_name Tomato
extends Item
+var cut: CPUParticles3D = load("res://map/items/cut.tscn").instantiate()
+
func _init(owned_by_: Node3D):
super(owned_by_)
base.add_child(load("res://map/items/tomato.tscn").instantiate())
+ base.add_child(cut)
+ cut.color = Color(1., 0., 0.)
+
+func progress(p: float, warn: bool):
+ super(p, warn)
+ cut.emitting = true
+
+func finish(warn: bool):
+ super(warn)
+ cut.emitting = false