protected override void OnDisableObject() { base.OnDisableObject(); name = _strOriginName; if (_pSlotCurrentPlaying != null && _bPlayOff_OnDisable) { _pSlotCurrentPlaying.DoStopSound(); } }
public void DoStopAllSound(bool bIsBGMSoundOff = true) { if (bIsBGMSoundOff) { _pSlotBGM.DoStopSound(); } for (int i = 0; i < _listSoundSlotAll.Count; i++) { _listSoundSlotAll[i].DoStopSound(); } }
private IEnumerator CoPlayUILabelAnimation() { while (true) { yield return(null); float fTime = _bIgnoreTimeScale ? RealTime.time : Time.time; float fTimeSec = fTime - _fPrevTime; if (fTimeSec > _fCharPerSec) { ProcEditText(_strLabelContent.Substring(0, _iCharLengthIndex)); _fPrevTime = fTime; if (_pSoundSlot_OnChangeText != null) { _pSoundSlot_OnChangeText.DoPlaySound(); } if (_iCharLengthIndex++ == _strLabelContent.Length) { if (_pSoundSlot_OnChangeText != null) { _pSoundSlot_OnChangeText.DoStopSound(); } ProcEditText(_strLabelContent); if (p_EVENT_OnAnimationFinish != null) { p_EVENT_OnAnimationFinish(); } break; } } } }
public void DoStopAllSound(bool bIsBGMSoundOff = true, bool bAudioSourceControl = false) { if (bAudioSourceControl) { AudioSource[] arrAudioSource = GameObject.FindObjectsOfType <AudioSource>(); for (int i = 0; i < arrAudioSource.Length; i++) { arrAudioSource[i].Stop(); } } if (bIsBGMSoundOff) { _pSlotBGM.DoStopSound(); } for (int i = 0; i < _listSoundSlotAll.Count; i++) { _listSoundSlotAll[i].DoStopSound(); } }