Inheritance: ICloneable
Esempio n. 1
0
 public AnimatedSprite(Texture2D sprite, Animation animation, Vector2 position)
 {
     _texture = sprite;
     this._animation = animation;
     _controlable = false;
     this._position = position;
 }
 public AnimatedSprite(Texture2D sprite, Animation animation, Vector2 position)
 {
     _texture = sprite;
     _animation = animation;
     _controlable = false;
     _position = position;
     _playCount = 0;
 }
Esempio n. 3
0
 private Animation(Animation animation)
 {
     this.frames = animation.frames;
 }
Esempio n. 4
0
        public object Clone()
        {
            var animationClone = new Animation(this) { frameWidth = this.frameWidth, frameHeight = this.frameHeight };

            animationClone.Reset();

            return animationClone;
        }
Esempio n. 5
0
        protected override void LoadContent()
        {
            Sprite = GameRef.Content.Load<Texture2D>("Graphics/Entities/boss_core");
            _eyeOrbit = GameRef.Content.Load<Texture2D>("Graphics/Entities/eye_orbit");

            // TODO: Upadte AnimatedSprite class to take a "rectangle" order
            var animation = new Animation(6, 42, 38, 0, 0, 2);
            Origin = new Vector2(21, 19);
            Scale = new Vector2(1.5f, 1.5f);
            _animatedSprite = new AnimatedSprite(Sprite, animation, Position) {IsAnimating = false};
            CollisionBoxes.Add(new CollisionCircle(_parent, Vector2.Zero, 25));
            base.LoadContent();
        }