Basic events system started.

This commit is contained in:
2025-05-06 11:07:16 -05:00
parent 4ad63b8c41
commit b9f0295722
22 changed files with 325 additions and 103 deletions

View File

@@ -27,9 +27,16 @@ func updateOverworldLogic(delta) -> void:
func updateMovement(delta) -> void:
# User movement
var dir:Vector2 = Input.get_vector("left", "right", "up", "down");
var moveSpeed:float;
if Input.is_action_pressed("run"):
moveSpeed = runSpeed;
else:
moveSpeed = speed;
if(dir.x != 0 or dir.y != 0):
velocity.x = dir.x * speed * delta;
velocity.z = dir.y * speed * delta;
velocity.x = dir.x * moveSpeed * delta;
velocity.z = dir.y * moveSpeed * delta;
# Update direction
if(dir.x >= abs(dir.y) and(
@@ -48,4 +55,3 @@ func updateMovement(delta) -> void:
direction = Direction.SOUTH;
elif (dir.y < 0):
direction = Direction.NORTH;
pass