Esempio n. 1
0
 // changes color of drawables as they move
 public void ChangeColor(MoveDel action, Color endColor, float d)
 {
     tweenerColorR = new Tweener(attributes.color.R, endColor.R, d, action);
     tweenerColorG = new Tweener(attributes.color.G, endColor.G, d, action);
     tweenerColorB = new Tweener(attributes.color.B, endColor.B, d, action);
     tweenerA = new Tweener(attributes.color.A, endColor.A, d, action);
 }
Esempio n. 2
0
        // method to set all the tweeners to null
        public void ClearTweeners()
        {
            tweenerX = null;
            tweenerColorR = null;

            tweenerY = null;
            tweenerRotate = null;
            tweenerDepth = null;

            tweenerColorG = null;
            tweenerColorB = null;
            tweenerA = null;
            tweenerScaleX = null;
            tweenerScaleY = null;
        }
Esempio n. 3
0
 // changes depth of drawables w delay
 public void ChangeDepth(MoveDel action, float endDepth, float d, float delay)
 {
     tweenerDepth = new Tweener(attributes.depth, endDepth, delay, d, action);
 }
Esempio n. 4
0
 //
 public void WhenDoneMoving(Tweener.EndHandler process)
 {
     tweenerX.Ended += process;
 }
Esempio n. 5
0
 // rescales drawables with a delay
 // not needed
 public void Scale(MoveDel action, Vector2 endScale, float d, float delay)
 {
     tweenerScaleX = new Tweener(attributes.scale.X, endScale.X, delay, d, action);
     tweenerScaleY = new Tweener(attributes.scale.Y, endScale.Y, delay, d, action);
 }
Esempio n. 6
0
 //
 public void WhenDoneFading(Tweener.EndHandler process)
 {
     tweenerA.Ended += process;
 }
Esempio n. 7
0
 // rotates drawables
 public void Rotate(MoveDel action, float endRotation, float d)
 {
     tweenerRotate = new Tweener(attributes.rotation, endRotation, d, action);
 }
Esempio n. 8
0
 // moves drawables with a delay
 public void Move(MoveDel action, Vector2 endPosition, float d, float delay)
 {
     isMoving = true;
     tweenerX = new Tweener(attributes.position.X, endPosition.X, delay, d, action);
     tweenerY = new Tweener(attributes.position.Y, endPosition.Y, delay, d, action);
     tweenerX.Ended += delegate() { this.isMoving = false; tweenerX = null;};
     tweenerY.Ended += delegate() { tweenerY = null; };
 }
Esempio n. 9
0
 // makes drawables fade away given a certain amount of time
 public void Fade(float d)
 {
     Color oldColor = attributes.color;
     ChangeColor(Actions.LinearMove, Color.Transparent, d);
     tweenerColorB.Ended += delegate() { tweenerColorB = null; };
     tweenerColorR.Ended += delegate() { tweenerColorR = null; };
     tweenerColorG.Ended += delegate() { tweenerColorG = null; };
     tweenerA.Ended += delegate() {
         isSeeable = false;
         tweenerA = null;
         attributes.color = oldColor;
     };
 }
Esempio n. 10
0
 // uses tweeners to tell when times are begun and ended, semi-roundabout
 public void SetTimer(int timerNumber, float endTime, Tweener.EndHandler whenEnded)
 {
     timer[timerNumber]        = new Tweener(0, 1, endTime, Actions.LinearMove);
     timer[timerNumber].Ended += whenEnded;
 }
Esempio n. 11
0
 // uses tweeners to tell when times are begun and ended, semi-roundabout
 public void SetTimer(int timerNumber, float endTime, Tweener.EndHandler whenEnded)
 {
     timer[timerNumber] = new Tweener(0, 1, endTime, Actions.LinearMove);
     timer[timerNumber].Ended += whenEnded;
 }