private void CheckLevelUp() { // check if the current exp reach to the level's exp. if (EXP_TO_LEVEL_UP_PER_LEVEL[CURRENT_LEVEL] < mCurrentExp) { // REACHED! // level up ++CURRENT_LEVEL; // TODO(Jen-Chieh): level up event. LEVEL_TEXT.text = LEVEL_STRING + CURRENT_LEVEL.ToString(); // reset exp for next level up mCurrentExp = 0; } if (CURRENT_LEVEL == TOTAL_LEVEL) { // beat the game! GAME_STATE = BF_GameState.WIN; // end the game when the level is reached. EndGame(); // end the level text LEVEL_TEXT.text = ""; } }
private void LostTheGame() { GAME_STATE = BF_GameState.LOSE; EndGame(); }