Initil Sprite Animation with the player class. (#4)

* Added RoSpriteSheet and defined animation states.

* Added methods o handle sprite animation states.

* Figured out how to flip sprites when moving left.

* Bug Fix: Ready state wasn't animating, now it is ;)

---------

Co-authored-by: jme9 <jme9@pdx.edu>
This commit is contained in:
J. M. Ellis
2025-05-21 16:21:37 -07:00
committed by GitHub
parent 6b03d0a3f4
commit 019b35dee4
8 changed files with 494 additions and 34 deletions
+5 -3
View File
@@ -222,14 +222,16 @@ namespace LunaLightXMG
// Draw debug messages
spriteBatch.DrawString(debugFont, $"VSP: {player.vsp}", new Vector2(10, 10), Color.White);
spriteBatch.DrawString(debugFont, $"Grounded: {player.grounded}", new Vector2(10, 30), Color.White);
spriteBatch.DrawString(debugFont, $"Walled: {player.walled}", new Vector2(10, 50), Color.White);
spriteBatch.DrawString(debugFont, $"Collision Side: {player.collisionSide}", new Vector2(10, 70), Color.White);
spriteBatch.DrawString(debugFont, $"HSP: {player.hsp}", new Vector2(10, 30), Color.White);
spriteBatch.DrawString(debugFont, $"Grounded: {player.grounded}", new Vector2(10, 50), Color.White);
spriteBatch.DrawString(debugFont, $"Walled: {player.walled}", new Vector2(10, 70), Color.White);
spriteBatch.DrawString(debugFont, $"Position: {player.position}", new Vector2(10, 90), Color.White);
spriteBatch.DrawString(debugFont, $"Camera Position: {camera2D.Position}", 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, $"Player state: {player.currentState}", new Vector2(10, 170), Color.White);
spriteBatch.DrawString(debugFont, $"Camera Rotation Control - Rotate left: K, Rotate right: L", new Vector2(10, 190), Color.White);