aboutsummaryrefslogtreecommitdiff
path: root/client/map/items/mochi.gd
diff options
context:
space:
mode:
authortpart <tpart120@proton.me>2024-09-16 16:11:04 +0200
committertpart <tpart120@proton.me>2024-09-16 16:11:04 +0200
commitbd4794cacdd93734ffea4861cf0c26dc07806c7a (patch)
tree20cec4b80ca7779b924856645b4c7ed4ddcb4589 /client/map/items/mochi.gd
parentf016f49175522801f1ebfcc0de632232eca823ca (diff)
downloadhurrycurry-bd4794cacdd93734ffea4861cf0c26dc07806c7a.tar
hurrycurry-bd4794cacdd93734ffea4861cf0c26dc07806c7a.tar.bz2
hurrycurry-bd4794cacdd93734ffea4861cf0c26dc07806c7a.tar.zst
Refactor mochi code with new system
Diffstat (limited to 'client/map/items/mochi.gd')
-rw-r--r--client/map/items/mochi.gd8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/map/items/mochi.gd b/client/map/items/mochi.gd
index 77e0ca41..3f873d10 100644
--- a/client/map/items/mochi.gd
+++ b/client/map/items/mochi.gd
@@ -18,10 +18,8 @@ extends Item
var model: MeshInstance3D = load("res://map/items/mochi.tscn").instantiate()
-func _init(owned_by_: Node3D):
+func _init(owned_by_: Node3D, color: Color):
super(owned_by_)
- add_child(model)
-
-func set_color(c: Color):
var mat: BaseMaterial3D = model.get_active_material(0)
- mat.albedo_color = c
+ mat.albedo_color = color
+ base.add_child(model)