public void NewGame() { isGameOver = false; LoseObj.SetActive(false); WinObj.SetActive(false); mGameData = new GameData(); mGameData.Init(); mUIScore.SetScore(mGameData.CurScore, mGameData.BestScore); mUINumberManager.InitNumbers(); for (int i = 0; i < GameData.StartShowNumberCount; i++) { mUINumberManager.ShowNextNumber(); } canControll = true; }
public void GamePlay() { /* Enemy[] arrEnemy = FindObjectsOfType<Enemy>(); * foreach (Enemy en in arrEnemy) * { * Destroy(en.gameObject); * } */ /* if (_CurrentWave > 1) * { * _CurrentWave = (int) (_CurrentWave * 0.7f); * } * _SpawnController.LoadSpawnData(); * _SpawnController.Play_Spawn(); */ _Score.SetScore(0); _State = E_PlayState.GamePlaying; GameWorld.SetActiveRecursively(_GamePlayUI, false); _PlayerManager.SpawnPlayer(); _WaveLoader.LoadCurrentWaveSet(); _Joystick.enable = true; }
/*-------------------------------------------------------------------------------- * Loop * --------------------------------------------------------------------------------*/ public void Loop() { UserInput(); uiCountdownTimer.SetTime(countdownTimer.CurrentTime); uiScore.SetScore(scoreManager.Score); difficultyManager.CheckDifficulty(countdownTimer.MaxDuration, countdownTimer.CurrentTime); }
public void SetScore(int _player1, int _player2) { score.SetScore(_player1, _player2); }