void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
public ActionResult SetAudioMute([FromBody] AudioMute audioMute) { if (CallStatus.Connected != CallController.Instance.CurrentCallStatus) { return(GetErrInfo(Constants.ErrorCode.NO_CONFERENCE)); } if (audioMute.muteOn) { CallController.Instance.EnableMic(false); } else { CallController.Instance.EnableMic(true); } return(Content("")); }
public Coroutine FadeOut( TPObjectSuper tObj, AudioSource Source, float time ) { if ( Source == null ) return null; if ( tObj == null ) tObj = this; AudioMute am = new AudioMute(); TPCode t = null; Coroutine cor = tObj.NewThread( Thread_FadeOut, ref t ); am.TPObj = tObj; am.Source = Source; am.time = time; am.volume = new float[ 1 ] { Source.volume }; t.DataObject = am; return cor; }
public Coroutine FadeOutAndPlay( int newIndex, bool bNewLoop, TPObjectSuper tObj, AudioSource Source, float time ) { if ( Source == null ) return null; if ( tObj == null ) tObj = this; AudioMute am = new AudioMute(); TPCode t = null; Coroutine cor = tObj.NewThread( Thread_FadeOut, ref t ); am.TPObj = tObj; am.Source = Source; am.time = time; am.volume = new float[ 1 ] { Source.volume }; am.NewClipIndex = newIndex; am.bNewLoop = bNewLoop; t.DataObject = am; return cor; }
protected override void Awake() { base.Awake(); audioMute = GetComponent <AudioMute>(); }