protected void PostAudioEvent(bool play = true) { if (play) { if (_currentlyPlayingAudio != audioEvent) { if (_currentlyPlayingAudio != FusionAudio.eEvent.None) { FusionAudio.PostEvent(_currentlyPlayingAudio, false); } _currentlyPlayingAudio = audioEvent; if (audioEvent != FusionAudio.eEvent.None) { FusionAudio.PostEvent(audioEvent); } } } else { if (_currentlyPlayingAudio == audioEvent) { FusionAudio.PostEvent(audioEvent, false); _currentlyPlayingAudio = FusionAudio.eEvent.None; } } }
private void PlayStartOrEndAnimationSound(bool isStart) { eGender gender = CharacterManager.Instance.CurrentCharacter.GeneralRecord.gender; //eClass characterClass = CharacterManager.Instance.CurrentCharacter.GeneralRecord.Class; FusionAudio.eEvent evt = FusionAudio.eEvent.None; //switch (characterClass) //{ // case eClass.Barbarian: // if (gender == eGender.Female) // { // if (isStart) // { // evt = FusionAudio.eEvent.SFX_Barbarian_Female_Dungeon_Start; // } // else // { // evt = FusionAudio.eEvent.SFX_Barbarian_Female_Dungeon_End; // } // } // else // { // if (isStart) // { // evt = FusionAudio.eEvent.SFX_Barbarian_Male_Dungeon_Start; // } // else // { // evt = FusionAudio.eEvent.SFX_Barbarian_Male_Dungeon_End; // } // } // break; // case eClass.Sorcerer: // if (gender == eGender.Female) // { // if (isStart) // { // evt = FusionAudio.eEvent.SFX_Sorcerer_Female_Dungeon_Start; // } // else // { // evt = FusionAudio.eEvent.SFX_Sorcerer_Female_Dungeon_End; // } // } // else // { // if (isStart) // { // evt = FusionAudio.eEvent.SFX_Sorcerer_Male_Dungeon_Start; // } // else // { // evt = FusionAudio.eEvent.SFX_Sorcerer_Male_Dungeon_End; // } // } // break; //} FusionAudio.PostEvent(evt, PlayerManager.LocalPlayerGameObject(), true); }