diff options
author | nokoe <nokoe@mailbox.org> | 2025-10-06 22:38:42 +0200 |
---|---|---|
committer | nokoe <nokoe@mailbox.org> | 2025-10-06 22:38:42 +0200 |
commit | 094417b7d289ff477670ffed6023dfdb55d73d00 (patch) | |
tree | 648c1232f1fc36148966e570c5317bfcd7dc9d82 /client/map/items/plate.gd | |
parent | fc4de182fa5c9afca17069f09f362109c0a957a2 (diff) | |
download | hurrycurry-094417b7d289ff477670ffed6023dfdb55d73d00.tar hurrycurry-094417b7d289ff477670ffed6023dfdb55d73d00.tar.bz2 hurrycurry-094417b7d289ff477670ffed6023dfdb55d73d00.tar.zst |
add height property to item, replace static function
Diffstat (limited to 'client/map/items/plate.gd')
-rw-r--r-- | client/map/items/plate.gd | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/map/items/plate.gd b/client/map/items/plate.gd index b4ae8baf..e5b86df2 100644 --- a/client/map/items/plate.gd +++ b/client/map/items/plate.gd @@ -18,6 +18,7 @@ extends Item func _init(owned_by_: Node3D): super(owned_by_) + height = .05 add_child(load("res://map/items/plate.tscn").instantiate()) func add_contents(contents: Array[String]): @@ -69,7 +70,7 @@ func add_contents(contents: Array[String]): base.add_child(item) item.position.y = height_sum @warning_ignore("static_called_on_instance") - height_sum += item.height() + height_sum += item.height func setup_sounds(): take_sound.setup([preload("res://map/items/sounds/plate_take.ogg")]) @@ -77,6 +78,3 @@ func setup_sounds(): static func base_position() -> Vector3: return Vector3(0., .025, 0.) - -static func height() -> float: - return .05 |