//............................................................ //.................................................. * START * void Start() { GameObject sceneManagerObject = GameObject.FindGameObjectWithTag("SceneManager"); m_SceneManager = sceneManagerObject.GetComponent <SceneManagement_SD>(); GameObject spawnerObject = GameObject.FindGameObjectWithTag("Spawner"); cannonRef_Spawner = spawnerObject.GetComponent <Spawner>(); GameObject sfxCannonObject = GameObject.Find("sfx_Cannon"); cannonAudioSource = sfxCannonObject.GetComponent <AudioSource>(); GameObject lightObject = GameObject.Find("CannonFlash"); fx_CannonLight = lightObject.GetComponent <Light>(); //Sets Network input if (X_IsAccelerometerON == true) { netInput = GameManager.GameManagerInstance.gameObject.GetComponent <NetworkServerUI>(); } }
//............................................................ //.................................................. * START * void Start() { m_IsReSpawning = true; m_SpawnLocationID_Previous = Random.Range(1, 5); m_SpawnLocationID_Current = Random.Range(1, 5); m_SpawnDelayTimer = m_SpawnDelayDuration; GameObject sceneManagerRefObject = GameObject.FindGameObjectWithTag("SceneManager"); m_SceneManagerRef = sceneManagerRefObject.GetComponent <SceneManagement_SD>(); }