public SpriteManager(Game game, string imagePath, int columns, int rows, string behaviourPath)
     : base(game)
 {
     this.imagePath = imagePath;
     this.columns = columns;
     this.rows = rows;
     this.behaviourPath = behaviourPath;
     reset = false;
     spriteList = new List<Sprite>();
     spriteBatch = (SpriteBatch)Game.Services.GetService(typeof(SpriteBatch));
     spriteImage = Game.Content.Load<Texture2D>(imagePath);
     animationManager = new AnimationManager(
         spriteImage, columns, rows, behaviourPath
     );
 }
Exemple #2
0
 public Animation(AnimationManager animationManager, int framesPerSecond)
 {
     this.animationManager = animationManager;
     frameLength = 1.0f / framesPerSecond;
 }