diff options
author | nokoe <nokoe@mailbox.org> | 2024-06-24 17:25:38 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2024-06-24 17:27:05 +0200 |
commit | 971c795b02f6a8f9702fe39e489f8ee5d0ae14a7 (patch) | |
tree | db4fa27f87994ee1472e226105a0f145c3b56f3e /client/map/items/pot.gd | |
parent | 75293243bd7d1141714ecbe5a874fa356a6320b3 (diff) | |
download | hurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar hurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar.bz2 hurrycurry-971c795b02f6a8f9702fe39e489f8ee5d0ae14a7.tar.zst |
add interaction effects
Diffstat (limited to 'client/map/items/pot.gd')
-rw-r--r-- | client/map/items/pot.gd | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/client/map/items/pot.gd b/client/map/items/pot.gd index fa5b038d..ac865329 100644 --- a/client/map/items/pot.gd +++ b/client/map/items/pot.gd @@ -16,9 +16,24 @@ class_name Pot extends Item +var steam: CPUParticles3D = load("res://map/items/steam.tscn").instantiate() + func _init(owned_by_: Node3D): super(owned_by_) base.add_child(load("res://map/items/pot.tscn").instantiate()) + base.add_child(steam) + +func progress(p: float, warn: bool): + super(p, warn) + steam.emitting = true + if warn: + steam.color = Color(.2, .2, .2) + else: + steam.color = Color(1., 1., 1.) + +func finish(warn: bool): + super(warn) + steam.emitting = false static func base_position() -> Vector3: return Vector3(0., 0.015, 0.) |