Added ui labels for debugging and playability
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user