Crystalline-awakening/player/smallPlayer/playerScript.gd

11 lines
258 B
GDScript3
Raw Permalink Normal View History

2025-05-18 12:59:58 +00:00
extends CharacterBody2D
const SPEED = 3.0
2025-05-18 14:16:02 +00:00
var Progress
2025-05-23 12:30:00 +00:00
var direction: Vector2
2025-05-18 12:59:58 +00:00
func _physics_process(delta: float) -> void:
2025-05-23 12:30:00 +00:00
#Handles movement
2025-05-23 13:00:15 +00:00
direction = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown")
move_and_collide(direction * SPEED)