void Awake() { m_ui_world = GameObject.Find("World Canvas").GetComponent <script_manager_ui_world>(); m_cannon_center = GameObject.Find("Cannon C").GetComponent <script_cannon>(); m_cannon_left = GameObject.Find("Cannon L").GetComponent <script_cannon>(); m_cannon_right = GameObject.Find("Cannon R").GetComponent <script_cannon>(); m_cannons[0] = m_cannon_center; m_cannons[1] = m_cannon_left; m_cannons[2] = m_cannon_right; shoot_coroutine = Shoot_Puck(); m_manager_audio = GetComponent <script_manager_audio>(); m_memory_bank = GetComponent <script_memory_bank>(); }
// Use this for initialization void Start() { m_goal = GameObject.Find("particles_goal").GetComponent <PlaygroundParticlesC>(); m_hots[1] = GameObject.Find("highlight_stick").GetComponent <PlaygroundParticlesC>(); m_hots[2] = GameObject.Find("highlight_pad").GetComponent <PlaygroundParticlesC>(); m_hots[3] = GameObject.Find("highlight_glove").GetComponent <PlaygroundParticlesC>(); //hot Audio source m_hots_audioSource[1] = GameObject.Find("model_goalie_stick_v1").GetComponent <AudioSource>(); m_hots_audioSource[2] = GameObject.Find("Goalie_Pad_Hand").GetComponent <AudioSource>(); m_hots_audioSource[3] = GameObject.Find("dummy_glove").GetComponent <AudioSource>(); //hot haptics m_hots_grabbable[1] = m_hots_audioSource[2].GetComponent <VRTK.script_grabbable>(); // stick and pad share the same grabbable m_hots_grabbable[2] = m_hots_audioSource[2].GetComponent <VRTK.script_grabbable>(); m_hots_grabbable[3] = m_hots_audioSource[3].GetComponent <VRTK.script_grabbable>(); // m_manager_audio = GameObject.Find("Manager_Gameplay").GetComponent <script_manager_audio>(); }