Crystalline-awakening/player/smallPlayer/playerScript.gd

14 lines
370 B
GDScript

extends CharacterBody2D
const SPEED = 3.0
var Progress
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)