void OnFlip(Player.FlipAccuracy flipAcc) { flips++; UpdateComboVal(flipAcc); score += comboVal; guiCtrl.UpdateHUD(score, comboVal); // Track high-combo-by-round here as it can decrease during the game if (comboVal > highComboThisRound) { highComboThisRound = comboVal; } // If flips hits a certain number, increase speeds, flip force, etc. // Use tables flipped, not score, as that can increase like crazy. if (flips % 10 == 0) { tbCtrl.PatternChange(); } else if (flips % 5 == 0) { speed += 0.5f; tbCtrl.SpeedIncrease(); player.SpeedIncrease(); } // ACHIEVEMENT CHECKS if (flipAcc == prevFlipAcc) { flipAccAchieveCounter++; if (flipAccAchieveCounter == Constants.ACH_FLIP_ACC_COUNT - 1) { if (flipAcc == Player.FlipAccuracy.perf) { guiCtrl.UpdateAchievement(Constants.ACH_FOCUSED_FLIPPER, "Achievement: Focused Flipper"); } else if (flipAcc == Player.FlipAccuracy.good) { guiCtrl.UpdateAchievement(Constants.ACH_GOOD_GRIP, "Achievement: Good Grip"); } else if (flipAcc == Player.FlipAccuracy.meh) { guiCtrl.UpdateAchievement(Constants.ACH_MESSY_MAYHEM, "Achievement: Messy Mayhem"); } } } else { flipAccAchieveCounter = 1; } prevFlipAcc = flipAcc; if (score > Constants.ACH_TABLE_TIRADE_SCORE - 1 || flips > Constants.ACH_TABLE_TIRADE_FLIPS - 1) { guiCtrl.UpdateAchievement(Constants.ACH_TABLE_TIRADE, "Achievement: Table Tirade"); } }