Exemple #1
0
        public Star(IDayNightCycle dayNightCycle, Texture2D spriteSheet, Trex trex, Vector2 position) : base(trex, position)
        {
            _dayNightCycle = dayNightCycle;

            _animation = SpriteAnimation.CreateSimpleAnimation(
                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();
        }