public AudioEvent(string _eventName, float _floatParameter, GameObject _parentGameObject) { m_eventName = _eventName; m_floatParameter = _floatParameter; m_parentGameObject = _parentGameObject; m_audioEventAction = AUDIOEVENTACTION.FloatParameter; }
bool IEventListener.HandleEvent(IEvent evt) { int audioEventAction = evt.GetAudioEventAction(); AUDIOEVENTACTION aUDIOEVENTACTION = (AUDIOEVENTACTION)audioEventAction; GameObject parentGameObject = evt.GetParentGameObject(); if (m_overrideAudioEventAction) { aUDIOEVENTACTION = m_newAudioEventAction; } switch (aUDIOEVENTACTION) { case AUDIOEVENTACTION.Play: Play(parentGameObject); break; case AUDIOEVENTACTION.Stop: Stop(parentGameObject); break; case AUDIOEVENTACTION.Pause: Pause(parentGameObject); break; case AUDIOEVENTACTION.LoadAsset: LoadAssets(); break; case AUDIOEVENTACTION.UnLoadAsset: UnLoadAssets(); break; case AUDIOEVENTACTION.StopAll: StopAll(); break; case AUDIOEVENTACTION.PauseAll: PauseAll(); break; } return(true); }
public AudioEvent(string _eventName, AUDIOEVENTACTION _audioEventAction, GameObject _parentGameObject) { m_eventName = _eventName; m_audioEventAction = _audioEventAction; m_parentGameObject = _parentGameObject; }
public AudioEvent(string _eventName, AUDIOEVENTACTION _audioEventAction) { m_eventName = _eventName; m_audioEventAction = _audioEventAction; }