Esempio n. 1
0
        public static void Assign(Sprite2D btn)
        {
            if (btn.states.Count > 0)
            {
                btn.ChangeState(0);
                return;
            }
            Storyboard sb = new Storyboard();

            btn.ClearState();
            sb.Clear();
            var toScale   = new Vector2(1.07f, 1.07f);
            var fromScale = Vector2.Divide(Vector2.One, toScale);

            sb.AddAnimation(new ScaleAnimation(sb, btn, GameSettings.GemSelectedEffectDuration, toScale, true, fromScale, true, true, true));
            btn.AddNewState(sb);
            btn.ChangeState(0);
        }
Esempio n. 2
0
 public static void Unassign(Sprite2D btn)
 {
     btn.ChangeState(-1);
 }