mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-22 08:04:23 +00:00
13 lines
265 B
GDScript
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()
|