forked from interstellar_development/freettrpg
11 lines
237 B
GDScript
11 lines
237 B
GDScript
extends CharacterBody2D
|
|
|
|
@export var speed = 200
|
|
|
|
func get_input():
|
|
var input_direction = Input.get_vector("left", "right", "up", "down")
|
|
velocity = input_direction * speed
|
|
|
|
func _physics_process(delta):
|
|
get_input()
|
|
move_and_slide()
|