public void Dispose()
 {
     _manager = null;
     _frame = null;
     _frameAnimations.Clear();
     _frameAnimations = null;
 }
Exemplo n.º 2
0
 public Frame(Frame frame)
 {
     Texture = frame.Texture;
     SourceRectangle = frame.SourceRectangle;
     Center = frame.Center;
     FlipMode = frame.FlipMode;
 }
        public FrameSprite(FrameSprite clone)
            : base()
        {
            _name = clone._name + "_clone";
            _frame = clone._frame;
            _destinationRect = clone._destinationRect;

            _transform = clone._transform;
            _origin = clone._origin;
            _tint = clone._tint;

            _paralaxFactor = clone._paralaxFactor;
            _paralaxEnabled = clone._paralaxEnabled;

            _flipMode = clone._flipMode;
        }
Exemplo n.º 4
0
        public PuppetPart(int id, string name, Frame frame, Puppet puppet)
            : base(name, frame)
        {
            _id = id;
            _puppet = puppet;
            _tAnimation = new TransformKeyframeAnimation(puppet.AnimManager);
            _tAnimation.Apply = (v) =>
                {
                    SetPosition(v.x, v.y);
                    SetRotation(v.rotation);
                    SetScale(v.scaleX, v.scaleY);
                };

            _cAnimation = new ColorKeyframeAnimation(puppet.AnimManager);
            _cAnimation.Apply = (v) => { SetTint(v); };

            _oAnimation = new Vector2KeyframeAnimation(puppet.AnimManager);
            _oAnimation.Apply = (v) => { Origin = v; };
        }
Exemplo n.º 5
0
 public void AddPart(string name, Frame frame)
 {
     PuppetPart p = new PuppetPart(childCount, name, frame, this);
     AddChild(p);
 }
 public FrameSprite(string name, Frame frame, Rectangle destinationRectangle)
     : this(name, frame)
 {
     _destinationRect = destinationRectangle;
 }
 public FrameSprite(string name, Frame frame)
     : this(name)
 {
     Frame = frame;
 }
 public virtual void SetFrame(Frame value)
 {
     _frame = value;
     _origin.X = _frame.Center.X;
     _origin.Y = _frame.Center.Y;
     _flipMode = (FlipFlags)_frame.FlipMode;
 }
 public FrameAnimationManager(Frame frame)
 {
     _manager = new ClockManager();
     _frame = frame;
     _frameAnimations = new Dictionary<string, FrameAnimation>();
 }