1
Fork 0
mirror of https://github.com/Steffo99/hella-farm.git synced 2024-11-25 09:34:24 +00:00
hella-farm/entities/imp.gd

13 lines
265 B
GDScript

extends CharacterBody2D
class_name Imp
@onready var sprite: SpriteLeftRight = $"Sprite"
func _on_move(movement: Vector2):
move_and_collide(movement)
sprite.handle_move(movement)
func _on_eater_eaten(edible: Edible) -> void:
edible.get_parent().queue_free()