Наследование: ICloneable
Пример #1
0
 public AnimatedSprite(Texture2D sprite, Animation animation, Vector2 position)
 {
     _texture = sprite;
     this._animation = animation;
     _controlable = false;
     this._position = position;
 }
Пример #2
0
 public AnimatedSprite(Texture2D sprite, Animation animation, Vector2 position)
 {
     _texture = sprite;
     _animation = animation;
     _controlable = false;
     _position = position;
     _playCount = 0;
 }
Пример #3
0
 private Animation(Animation animation)
 {
     this.frames = animation.frames;
 }
Пример #4
0
        public object Clone()
        {
            var animationClone = new Animation(this) { frameWidth = this.frameWidth, frameHeight = this.frameHeight };

            animationClone.Reset();

            return animationClone;
        }
Пример #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();
        }