Esempio n. 1
0
 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
     );
 }
Esempio n. 2
0
 public Animation(AnimationManager animationManager, int framesPerSecond)
 {
     this.animationManager = animationManager;
     frameLength = 1.0f / framesPerSecond;
 }