mirror of
https://github.com/TheRavenwoodArts/LunaLightXMG.git
synced 2026-07-30 22:55:03 -07:00
Fixed a bug I introduced ;)
This commit is contained in:
+5
-14
@@ -98,22 +98,12 @@ namespace LunaLightXMG
|
||||
private void TestCameraWhilePlaying()
|
||||
{
|
||||
KeyboardState keyboardState = Keyboard.GetState();
|
||||
var KeyI = keyboardState.IsKeyDown(Keys.I);
|
||||
var KeyO = keyboardState.IsKeyDown(Keys.O);
|
||||
var KeyK = keyboardState.IsKeyDown(Keys.K);
|
||||
var KeyL = keyboardState.IsKeyDown(Keys.L);
|
||||
var KeyB = keyboardState.IsKeyDown(Keys.B);
|
||||
var KeyN = keyboardState.IsKeyDown(Keys.N);
|
||||
var KeyM = keyboardState.IsKeyDown(Keys.M);
|
||||
|
||||
if (KeyI)
|
||||
{
|
||||
camera2D.Zoom += 1f;
|
||||
}
|
||||
if (KeyO)
|
||||
{
|
||||
camera2D.Zoom -= 1f;
|
||||
}
|
||||
if (KeyK)
|
||||
{
|
||||
camera2D.Rotation -= 0.01f;
|
||||
@@ -263,12 +253,10 @@ namespace LunaLightXMG
|
||||
spriteBatch.DrawString(debugFont, $"Walled: {player.walled}", new Vector2(10, 50), Color.White);
|
||||
spriteBatch.DrawString(debugFont, $"Position: {player.position}", new Vector2(10, 70), Color.White);
|
||||
spriteBatch.DrawString(debugFont, $"Camera Position: {camera2D.Position}", new Vector2(10, 90), Color.White);
|
||||
spriteBatch.DrawString(debugFont, $"Camera Zoom: {camera2D.Zoom}", new Vector2(10, 110), Color.White);
|
||||
spriteBatch.DrawString(debugFont, $"Camera Rotation: {camera2D.Rotation}", new Vector2(10, 130), Color.White);
|
||||
spriteBatch.DrawString(debugFont, $"Render Target Zoom: {renderHandler.ZoomLevel}", new Vector2(10, 150), 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, $"Camera Zoom Control - Zoom in: I, Zoom out: O", new Vector2(10, 170), 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: B, Zoom normal: N, Zoom out: M", new Vector2(10, 210), Color.White);
|
||||
@@ -285,6 +273,9 @@ namespace LunaLightXMG
|
||||
// reset cam
|
||||
camera2D.Rotation = 0;
|
||||
camera2D.Zoom = 1f;
|
||||
|
||||
// reset render target zoom
|
||||
renderHandler.ZoomNormalize();
|
||||
|
||||
// Reset player position
|
||||
player.Reset(new Vector2(163, 0));
|
||||
|
||||
Reference in New Issue
Block a user