Big project cleanup with overhaul of file responsibilities (KISS) and code (DRY, YAGNI)

This commit is contained in:
2026-05-14 11:17:02 +02:00
parent bd6cdeb97b
commit 300c8f5a42
54 changed files with 2030 additions and 1745 deletions
+4 -9
View File
@@ -17,8 +17,7 @@ public partial class Camera3d : Camera3D
{
Control focused = GetViewport().GuiGetFocusOwner();
if (focused is LineEdit || focused is TextEdit)
return;
if (focused is LineEdit || focused is TextEdit) return;
if (canMove) MoveCamera(delta);
}
@@ -38,17 +37,13 @@ public partial class Camera3d : Camera3D
if (direction != Vector3.Zero)
{
if(robot != null) robot = null;
robot = null;
direction = direction.Normalized() * Speed * (Input.IsActionPressed("sprint") ? 2.5f : 1) * d;
Translate(direction);
}
else
else if (robot != null)
{
if(robot != null)
{
Position = new Vector3(robot.Position.X, 10 - visibleLayer * 4, robot.Position.Z + 4f);
}
Position = new Vector3(robot.Position.X, 10 - visibleLayer * 4, robot.Position.Z + 4f);
}
if (Position.Y != 10 - visibleLayer * 4)