feat: add game scene and player scene
This commit is contained in:
10
scripts/player.gd
Normal file
10
scripts/player.gd
Normal file
@@ -0,0 +1,10 @@
|
||||
extends CharacterBody2D
|
||||
|
||||
const SPEED = 300.0
|
||||
const JUMP_VELOCITY = -400.0
|
||||
|
||||
func _physics_process(delta):
|
||||
velocity.x = Input.get_axis("ui_left", "ui_right") * SPEED
|
||||
velocity.y = Input.get_axis("ui_up", "ui_down") * SPEED
|
||||
|
||||
move_and_slide()
|
||||
Reference in New Issue
Block a user