First commit

This commit is contained in:
2025-12-04 11:13:48 -05:00
commit 5d8452c70d
39 changed files with 1509 additions and 0 deletions

15
scripts/player.gd Normal file
View File

@@ -0,0 +1,15 @@
class_name Player extends CharacterBody3D
@export var speed : float = 10
@onready var body = $Body
func _enter_tree() -> void:
Game.player = self
func _physics_process(delta: float) -> void:
var dir = Input.get_vector("west", "east", "north", "south")
dir = Vector3(dir.x, 0, dir.y)
if dir.length_squared() > 0:
body.look_at(body.global_position - dir)
velocity = speed * dir
move_and_slide()