示例#1
0
 public void Init()
 {
     Current  = this;
     HealthUI = GetComponentInChildren <HealthUI>();
     HealthUI.Init();
     ScoreUI = GetComponentInChildren <ScoreUI>();
     ScoreUI.Init();
     LivesUI = GetComponentInChildren <LivesUI>();
     LivesUI.Init();
     EndUI = GetComponentInChildren <EndUI>();
     EndUI.Init();
 }
示例#2
0
        /// <summary>
        /// Resets game if button is pressed.
        /// </summary>
        public void Yes()
        {
            GameManager.Instance.score.CurrentScore = 0;
            GameManager.Instance.Player.ResetUnit();
            List <Unit> enemies = GameManager.Instance.Enemies;

            foreach (Unit unit in enemies)
            {
                unit.ResetUnit();
            }

            EndUI.InitItems();
            Time.timeScale = 1;
        }