private void Awake() { m_RigidBody = GetComponent <Rigidbody>(); m_FlyerHealthController = FindObjectOfType <FlyerHealthController>(); m_Flyer = m_FlyerHealthController.gameObject; m_Dolphin = FindObjectOfType <DolphinScript>(); m_Cam = Camera.main.transform; }
private void Awake () { m_RigidBody = GetComponent<Rigidbody>(); m_FlyerHealthController = FindObjectOfType<FlyerHealthController>(); m_Flyer = m_FlyerHealthController.gameObject; m_Cam = Camera.main.transform; }
private void Awake() { m_RigidBody = GetComponent <Rigidbody>(); m_FlyerHealthController = FindObjectOfType <FlyerHealthController>(); m_Flyer = m_FlyerHealthController.gameObject; m_LaserOpponentObjectPool = FindObjectOfType <EnvironmentController>().GetLaserOpponentPool(); m_Cam = Camera.main.transform; }
private void Awake() { // Create a list of materials and add the main material on each child renderer to it. m_Materials = new List <Material>(); Renderer[] renderers = GetComponentsInChildren <Renderer>(); for (int i = 0; i < renderers.Length; i++) { m_Materials.Add(renderers[i].material); } // Set references to the camera and flyer. m_Cam = Camera.main.transform; m_Flyer = GameObject.FindGameObjectWithTag("Player"); m_Dolphin = GameObject.FindGameObjectWithTag("Dolphin"); m_beatEvent = GameObject.FindGameObjectWithTag("Beat Event Ring"); m_health = m_Flyer.GetComponent <FlyerHealthController>(); }
} // The object pool the laser belongs to. private void Awake() { flyerHealthController = FindObjectOfType <FlyerHealthController>(); m_Flyer = flyerHealthController.gameObject; m_RigidBody = GetComponent <Rigidbody>(); }