extends CharacterBody2D const SPEED = 3.0 #func _ready() -> void: # var collectable = get_node("collectableCrystal") # collectable.connect("pickup",self,"collect") #func collect(): # print("something") func _physics_process(delta: float) -> void: # Get the input direction and handle the movement/deceleration. # As good practice, you should replace UI actions with custom gameplay actions. var direction := Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown") move_and_collide(direction * SPEED)