class_name HealthPickup
extends Interactable


onready var health_icon: AnimatedSprite = $AnimatedSprite

onready var drop_raycast: RayCast2D = $RayCast2D

func _ready():
	#gravity = ProjectSettings.get_setting("physics/2d/default_gravity")
	gravity = 90
	# Doesn't get enabled until it drops
	monitoring = false

func _physics_process(delta):

	if drop_raycast.is_colliding() == false:
		var velocity = Vector2(0,0)
		position.y += delta * gravity
	else:
		monitoring = true

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
	queue_free()

