Пример #1
0
        private void OnRoundPrepare()
        {
            EventManager.Instance.UpdateScore("0");
            var tankPlayer = tankPlayerObject.GetComponent <Tank>();

            tankPlayer.ResetStats();
            tankPlayerObject.transform.position = spawnPointTankPlayer.transform.position;
            tankPlayerObject.transform.rotation = Quaternion.identity;
            StartCoroutine(Coroutines.WaitForSecondsCoroutine(EventManager.Instance.RoundBegin, 4));
        }
Пример #2
0
        private void OnRoundPrepare()
        {
            var tankPlayer = tankPlayerObject.GetComponent <Tank>();
            var tankAI     = tankAIObject.GetComponent <Tank>();

            tankPlayer.ResetStats();
            tankAI.ResetStats();
            ballGameObject.transform.position = spawnPointBall.transform.position;
            ballGameObject.SetActive(true);
            tankPlayerObject.transform.position = spawnPointTankPlayer.transform.position;
            tankPlayerObject.transform.rotation = Quaternion.identity;
            tankAIObject.transform.position     = spawnPointTankAI.transform.position;
            tankAIObject.transform.rotation     = Quaternion.identity;
            StartCoroutine(Coroutines.WaitForSecondsCoroutine(EventManager.Instance.RoundBegin, 4));
        }
Пример #3
0
 private void OnScoreGoal(bool enemyGoal)
 {
     if (enemyGoal)
     {
         GameManager.Instance.playerScore += 1;
     }
     else
     {
         GameManager.Instance.enemyScore += 1;
     }
     EventManager.Instance.UpdateScore(GameManager.Instance.enemyScore + " : " + GameManager.Instance.playerScore);
     SpawnGoalExplosion();
     ballGameObject.SetActive(false);
     StartCoroutine(Coroutines.WaitForSecondsCoroutine(EventManager.Instance.RoundEnd, 3));
 }