Chaos_Kitchen/Scripts/Interactibles/Crate.gd

26 lines
631 B
GDScript3
Raw Normal View History

extends ItemContainer
2024-02-17 12:42:08 +01:00
# Called when the node enters the scene tree for the first time.
func _ready():
var firstitem = Item.new()
firstitem.name = "rouge"
firstitem.Icon = Sprite2D.new()
firstitem.Icon.set_texture(preload("res://Sprite/IMG_0156.PNG"))
firstitem.Icon.set_texture_filter(CanvasItem.TEXTURE_FILTER_NEAREST)
items.append(firstitem)
2024-02-17 12:42:08 +01:00
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta):
pass
func _on_body_entered(body : Player):
body.can_interact.emit(self)
2024-02-17 12:42:08 +01:00
func _on_body_exited(body: Player):
body.remove_interact.emit() # Replace with function body.