added poses for items in shelf
This commit is contained in:
18
Scripts/pose_item.gd
Normal file
18
Scripts/pose_item.gd
Normal file
@@ -0,0 +1,18 @@
|
||||
extends Node3D
|
||||
|
||||
var is_free: bool
|
||||
var item
|
||||
|
||||
func _init() -> void:
|
||||
is_free = true
|
||||
|
||||
func add_item(new_item):
|
||||
is_free = false
|
||||
item = new_item
|
||||
self.add_child(item)
|
||||
item.position = global_position
|
||||
print("item added")
|
||||
|
||||
|
||||
func remove_item():
|
||||
self.remove_child(item)
|
||||
Reference in New Issue
Block a user