Exemple #1
0
 public Star(Texture2D spriteSheet, Trex trex, Vector2 position) : base(trex, position)
 {
     _animation = SpriteAnimation.CreateSimpeAnimation(
         spriteSheet,
         new Point(INITIAL_FRAME_TEXTURE_COORDS_X, INITIAL_FRAME_TEXTURE_COORDS_Y),
         SPRITE_WIDTH,
         SPRITE_HEIGHT,
         new Point(0, SPRITE_HEIGHT),
         3,
         ANIMATION_FRAME_LENGTH
         );
     _animation.ShouldLoop = true;
     _animation.Play();
 }