This commit is contained in:
hellka7
2025-05-17 19:41:52 -07:00
parent b4cd4c783b
commit 7146e62d3d
2 changed files with 8 additions and 6 deletions
+5 -3
View File
@@ -105,6 +105,8 @@ namespace LunaLightXMG
player = new Player(initPlayerPosition);
playerInput = new PlayerInput();
playerInput.HasControl = true;
// Misc.
prevKeyState = Keyboard.GetState();
player.LoadContent(Content);
// Init number of platforms / enemies
@@ -126,8 +128,7 @@ namespace LunaLightXMG
// Get utilities
utilities = new Utilities();
// Misc.
prevKeyState = Keyboard.GetState();
}
private void LoadPlatforms()
@@ -162,7 +163,7 @@ namespace LunaLightXMG
ResetGame();
// Update player
playerInput.Update(keyboardState);
playerInput.Update();
player.Update(gameTime, playerInput, platforms);
// Update Enemies
@@ -276,6 +277,7 @@ namespace LunaLightXMG
spriteBatch.DrawString(debugFont, $"Camera Position: {camera2D.Position}", new Vector2(10, 90), Color.White);
spriteBatch.DrawString(debugFont, $"Camera Rotation: {camera2D.Rotation}", new Vector2(10, 110), Color.White);
spriteBatch.DrawString(debugFont, $"Render Target Zoom: {renderHandler.ZoomLevel}", new Vector2(10, 130), Color.White);
spriteBatch.DrawString(debugFont, $"Key Pressed: {Keyboard.GetState().GetPressedKeys()}", new Vector2(10, 150), Color.White);
spriteBatch.DrawString(debugFont, $"Camera Rotation Control - Rotate left: K, Rotate right: L", new Vector2(10, 190), Color.White);
spriteBatch.DrawString(debugFont, $"Render Target Zoom Control - Zoom in: U, Zoom normal: I, Zoom out: O", new Vector2(10, 210), Color.White);