Crystalline-awakening/player/smallPlayer/playerScript.gd

16 lines
515 B
GDScript3
Raw Normal View History

2025-05-18 12:59:58 +00:00
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)