/// <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) { return; } almDelay.Update(timer.DeltaTimeMS); if (almDelay.Check(Alarm.CheckType.RESET)) { if (objValue != curValue) { if (StateMain.singleton.soundsOn) { StateMain.singleton.Sounds.odoTick.Play(false, true); } if (Math.Abs(objValue - curValue) < Math.Abs(step)) { curValue = objValue; } else { curValue += step; } } txtCounter.Text = curValue.ToString(format); if (txtCounter.Text == "") { txtCounter.Text = "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 (status == iconStatus.Concealed) { if (Released && (StateMain.singleton.currentState == StateMain.singleton.stPlay || StateMain.singleton.currentState == StateMain.singleton.stCredit)) { //if (StateMain.singleton.soundsOn) //{ // StateMain.singleton.Sounds.iconReveal.Stop(true); // StateMain.singleton.Sounds.iconReveal.Play(false, true); //} //Reveal(); //if(!((StPlay)StateMain.singleton.stPlay).autoReveal) //StateMain.singleton.saveRecoveryRecord(); //every icon should be updated... } } else if (status == iconStatus.Revealing) { almCoverAnim.Update(timer.DeltaTimeMS); if (almCoverAnim.Check(Alarm.CheckType.RESET)) { coverAnimFrame++; if (coverAnimFrame >= Definitions.CoverAnimationFrames) { IconsView.singleton.iconsRevealed++; status = iconStatus.Revealed; } } } }
/// <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; } } }
/// <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) { foreach (Icon icon in icons) { icon.Update(keyboard, mouse, timer); } foreach (AnimatedLabel anim in StateMain.singleton.Animations) { anim.Update(keyboard, mouse, timer); } if (StateMain.singleton.currentState == StateMain.singleton.stWin && (((StPlay)StateMain.singleton.stPlay).winnings > 0 || ((StPlay)StateMain.singleton.stPlay).freeTabsWon > 0)) { //almChangeFlashingLine.Update(timer.DeltaTimeMS); //almFlashLines.Update(timer.DeltaTimeMS); int tempFrm = 0; if (StateMain.singleton.Animations.Count > 0) { tempFrm = StateMain.singleton.Animations[0].GetFrame(); if (tempFrm % 7 == 0 && lastFrm != tempFrm && tempFrm != 28) { lastFrm = tempFrm; lineShowing = !lineShowing; if (lineShowing) { lineFlashesSoFar++; } } //Debug.WriteLine(lineShowing + " - " + tempFrm + " - " + lastFrm + " - " + curLineFlashing); } if ((tempFrm >= 28) || firstWinFlag) { lineFlashesSoFar = 0; curLineFlashing = (firstWinFlag)?getFirstWinLine():getNextWinLine(curLineFlashing); StateMain.singleton.lblLineAmount.Text = "Pattern " + (curLineFlashing + 1).ToString() + " pays " + ((StPlay)StateMain.singleton.stPlay).finalLineAmounts[curLineFlashing].ToString("C"); StateMain.singleton.Animations.Clear(); startWinnerIconAnims(((StPlay)StateMain.singleton.stPlay).finalNoOfIconsWon, curLineFlashing, ((StPlay)StateMain.singleton.stPlay).finalLineAmounts); if (((StPlay)StateMain.singleton.stPlay).freeTabsWon > 0) { animateFreeTabsIcon(); } firstWinFlag = false; } } }