public void endAnimation() { active = true; ka = new KeyedAnimation(movingObject, leaving); ka.Start(); phase = 2; }
public void startAnimation() { active = true; ka = new KeyedAnimation(movingObject, coming); ka.Start(); phase = 1; }
public override void OnEnter() { almFreeTabsWinSignDelay.Enable(); almFreeTabsWinSignDelay.Reset(); //Trigger animations for winning icons... play = (StPlay)context.stPlay; context.wonAmount = getWinAmount(); context.pinBalance += context.wonAmount; if ((context.wonAmount >= Bingo.singleton.settings.verifyWinAmt) && (Bingo.singleton.settings.verifyWinAmt > 0M)) { WinVerification frmWinVerificaiton = new WinVerification(); frmWinVerificaiton.SetWinValue = context.wonAmount; frmWinVerificaiton.ShowDialog(Bingo.singleton); } context.iconsView.firstWinFlag = true; almWinDelay.Reset(); almWinDelay.Enable(); if (play.freeTabsWon > 0) { context.freeTabsBalance += play.freeTabsWon; context.startFreeTabsMode(); ka = new KeyedAnimation(context.picFreeTabsWinSign, animComing); ka.tag = (int)1; //1st anim ka.Start(); } else { context.btnContinue.Enable = context.btnContinue.Visible = true; } if (context.freeTabsMode) { context.freeTabsTotalWon += context.wonAmount; } context.saveRecoveryRecord(); }
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); } } }