2024-02-17 16:31:03 +01:00
|
|
|
extends ItemContainer
|
2024-02-17 12:42:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
# Called when the node enters the scene tree for the first time.
|
|
|
|
func _ready():
|
2024-02-17 16:31:03 +01:00
|
|
|
var firstitem = Item.new()
|
|
|
|
firstitem.name = "rouge"
|
|
|
|
firstitem.Icon = Sprite2D.new()
|
2024-02-19 12:16:42 +01:00
|
|
|
firstitem.Icon.set_texture(preload("res://GraphicalAssets/Sprite/IMG_0156.PNG"))
|
2024-02-17 16:31:03 +01:00
|
|
|
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):
|
2024-02-17 16:31:03 +01:00
|
|
|
body.can_interact.emit(self)
|
2024-02-17 12:42:08 +01:00
|
|
|
|
|
|
|
|
2024-02-17 16:31:03 +01:00
|
|
|
func _on_body_exited(body: Player):
|
|
|
|
body.remove_interact.emit() # Replace with function body.
|