initial commit
This commit is contained in:
11
actors/player.gd
Normal file
11
actors/player.gd
Normal file
@@ -0,0 +1,11 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
@export var speed = 100
|
||||
|
||||
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()
|
||||
Reference in New Issue
Block a user