Added ui labels for debugging and playability

This commit is contained in:
2026-04-22 17:18:15 +02:00
parent a324ff0d16
commit e1778fb446
8 changed files with 110 additions and 13 deletions

View File

@@ -14,8 +14,8 @@ namespace Voxel.Graphics
public static float Speed = 5f;
public static float ShiftSpeed = 20f;
private static int _width;
private static int _height;
public static int Width;
public static int Height;
public static Matrix4 view =>
Matrix4.LookAt(Position, Position + Front, Vector3.UnitY);
@@ -47,7 +47,7 @@ namespace Voxel.Graphics
public static void UpdateProjection()
{
float fov = MathHelper.DegreesToRadians(FOV);
float aspectRatio = _width / (float)_height;
float aspectRatio = Width / (float)Height;
float near = 0.1f;
float far = 1000f;
@@ -56,8 +56,8 @@ namespace Voxel.Graphics
public static void UpdateSize(int width, int height)
{
_width = width;
_height = height;
Width = width;
Height = height;
UpdateProjection();
}