11 lines
258 B
GDScript
11 lines
258 B
GDScript
extends CharacterBody2D
|
|
|
|
const SPEED = 3.0
|
|
var Progress
|
|
var direction: Vector2
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
#Handles movement
|
|
direction = Input.get_vector("moveLeft", "moveRight", "moveUp", "moveDown")
|
|
move_and_collide(direction * SPEED)
|