Creating campus scene, adding simple player node for testing

This commit is contained in:
2026-04-06 16:19:47 +02:00
parent feabed2736
commit 90179df9ef
54 changed files with 1079 additions and 0 deletions

18
entities/player/player.gd Normal file
View File

@@ -0,0 +1,18 @@
extends CharacterBody2D
@export var speed = 400
func _physics_process(_delta):
velocity.x = 0
velocity.y = 0
if Input.is_action_pressed("move_down"):
velocity.y = speed
elif Input.is_action_pressed("move_up"):
velocity.y = -speed
elif Input.is_action_pressed("move_right"):
velocity.x = speed
elif Input.is_action_pressed("move_left"):
velocity.x = -speed
move_and_slide()