new item model and interactions
person can hold item now. Global can give item to person.
This commit is contained in:
@@ -1,15 +1,25 @@
|
||||
extends Node3D
|
||||
|
||||
@onready var outline_shader = preload("res://Shaders/outline.gdshader")
|
||||
|
||||
@onready var food_item = preload("res://Scenes/Prefabs/food_item.tscn")
|
||||
@export var debugLabel1: Label
|
||||
|
||||
signal interact(person,interact_object)
|
||||
|
||||
func _ready() -> void:
|
||||
print(outline_shader)
|
||||
|
||||
interact.connect(_on_interact)
|
||||
|
||||
func _on_interact(person, object):
|
||||
object.ActionNode.start_action(person, object)
|
||||
|
||||
|
||||
func give_item(person, item_id):
|
||||
var item = get_item_form_id(item_id)
|
||||
person.hold_item(item)
|
||||
|
||||
|
||||
|
||||
func get_item_form_id(id):
|
||||
match id:
|
||||
0:
|
||||
return food_item
|
||||
|
||||
Reference in New Issue
Block a user