Added texture cache and sprite origins.

This commit is contained in:
2026-01-14 23:09:13 -05:00
parent fcb4f1cf05
commit 61d51f5188
36 changed files with 319 additions and 83 deletions

View File

@@ -1,5 +1,6 @@
using AlienAttack.MonoGame.Audio;
using AlienAttack.MonoGame.GameLoops;
using AlienAttack.MonoGame.Textures;
using AlienAttack.MonoGame.View;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
@@ -22,6 +23,7 @@ public class AlienAttackGame : Game
public SpriteBatch SpriteBatch => _spriteBatch;
public ViewTransform ViewTransform => _viewTransform;
public AudioManager Audio { get; private set; } = new();
public TextureCache Textures { get; } = new();
private const string SDL = "SDL2.dll";
@@ -76,6 +78,7 @@ public class AlienAttackGame : Game
// TODO: use this.Content to load your game content here
Audio.LoadContent(Content);
Textures.Initialize(Content);
}
protected override void Update(GameTime gameTime)