Example #1
0
        private void CreateMoveToAnimation(Vector2 position0, Vector2 position1)
        {
            var transitionParameters = new TransitionParameters(1.2f, EasingFunctions.QuarticEaseInOut);
            var transition           = new Vector2Transition(() => position0, v => _position = v, position1, transitionParameters);

            transition.TransitionComplete += (sender, args) => CreateMoveToAnimation(position1, position0);
            _animationSystem.Attach(transition);
        }
Example #2
0
 public bool OnTouchDown(Vector2 position, int pointerIndex)
 {
     _animationSystem.Attach(new ColorAnimation(_color, new Color(Color.Black, 0.0f), v => _color = v, 0.5f));
     return(true);
 }