// Start is called before the first frame update void Start() { playerManager = playerManageObj.GetComponent <PlayerManager>(); newPlayerMove = playerRotateAxis.GetComponent <NewPlayerMove>(); audioSource = GetComponent <AudioSource>(); soundManager = GameObject.Find("SoundManager(Clone)").GetComponent <SoundManager>(); }
// Start is called before the first frame update void Start() { wave = 1; score = 0; initiated_enemies = 0; curSpawnTime = respawn_gap; if (!m_playMove) { m_playMove = GameObject.FindGameObjectWithTag("Player").GetComponent <NewPlayerMove>(); } if (availableTowers.Length == 0) { availableTowers = GameObject.FindGameObjectsWithTag("Tower"); } for (int i = 0; i < availableTowers.Length; i++) { TotalTowerHealth += availableTowers[i].GetComponent <TowerMgr>().Health; } Invoke("updateUI", 1f); }