Added texture cache and sprite origins.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user