示例#1
0
        public override void OnUpdate(Keyboard keyboard, Mouse mouse, Timer timer)
        {
            if (context.btnContinue.Released)
            {
                context.odoBalance.setValueInstant(context.pinBalance);
                context.changeStateTo(context.stCredit);
            }

            if (ka != null) //there is an animation to play
            {
                ka.Update(keyboard, mouse, timer);
                if (ka.isDone())
                {
                    if (((int)ka.tag) == 1)
                    {
                        //start 2nd animation...
                        almFreeTabsWinSignDelay.Update(timer.DeltaTimeMS);
                        if (almFreeTabsWinSignDelay.Check(Alarm.CheckType.RESET))
                        {
                            ka     = new KeyedAnimation(context.picFreeTabsWinSign, animLeaving);
                            ka.tag = (int)2; //2nd anim
                            ka.Start();
                        }
                    }
                    else if (((int)ka.tag) == 2)
                    {
                        context.picFreeTabsWinSign.MoveAbsolute(261, -537);
                        ka = null;
                        context.odoBalance.setValueInstant(context.pinBalance);
                        context.changeStateTo(context.stCredit);
                    }
                }
            }
            else if (context.freeTabsMode)  //animation done...
            {
                almWinDelay.Update(timer.DeltaTimeMS);
                if (almWinDelay.Check(Alarm.CheckType.RESET))
                {
                    context.odoBalance.setValueInstant(context.pinBalance);
                    context.changeStateTo(context.stCredit);
                }
            }
        }
示例#2
0
 /// <summary>
 /// Updates the card test for card Presses if state is set to selecting
 /// </summary>
 /// <param name="mouse">current Mouse object</param>
 /// <param name="timer">current Timer Object</param>
 protected override void OnUpdate(GameCore.Input.Keyboard keyboard, GameCore.Input.Mouse mouse, GameCore.Timing.Timer timer)
 {
     if (active && ka != null)
     {
         ka.Update(keyboard, mouse, timer);
         if (ka.isDone())
         {
             active = false;
         }
     }
 }