extends Interactable


# Declare member variables here. Examples:
# var a = 2
# var b = "text"

onready var sprite: Sprite = $Sprite

const pickup = preload("res://src/Interactables/HealthPickup.tscn")
var opened := false

func trigger_interaction():
	# This is something that should maybe be extended for every differant interactible.
	# They could inherit from this base class and implement this function. 
	sprite.frame = 1
	
	if !opened:
		var chest_item = pickup.instance()
		chest_item.global_position = global_position + Vector2(0,-50)
		owner.add_child(chest_item)
		opened = true
