/// <summary> /// /// </summary> protected virtual void Awake() { m_Player = GameObject.FindObjectOfType(typeof(vp_FPPlayerEventHandler)) as vp_FPPlayerEventHandler; if(m_Player != null) m_PlayerAudioSource = m_Player.GetComponent<AudioSource>(); m_DeviceAudioSource = GetComponent<AudioSource>(); if (Button != null) { m_OriginalButtonPos = Button.transform.localPosition; m_OriginalButtonColor = ButtonRenderer.material.color; m_PulsingLight = Button.GetComponentInChildren<vp_PulsingLight>(); } if (m_PulsingLight != null) m_OriginalPulsingLightMaxIntensity = m_PulsingLight.m_MaxIntensity; }
/// <summary> /// /// </summary> protected virtual void Awake() { m_Player = GameObject.FindObjectOfType(typeof(vp_FPPlayerEventHandler)) as vp_FPPlayerEventHandler; if (m_Player != null) { m_PlayerAudioSource = m_Player.GetComponent <AudioSource>(); } m_DeviceAudioSource = GetComponent <AudioSource>(); if (Button != null) { m_OriginalButtonPos = Button.transform.localPosition; m_OriginalButtonColor = ButtonRenderer.material.color; m_PulsingLight = Button.GetComponentInChildren <vp_PulsingLight>(); } if (m_PulsingLight != null) { m_OriginalPulsingLightMaxIntensity = m_PulsingLight.m_MaxIntensity; } }