public void pauseClip(bool status) { if (Application.isPlaying && currentAudio != null) { if (status) { StartCoroutine( MyAnimationController.playAnimation( audioPauseContinueAnimator, "pause" ) ); currentAudio.Pause(); } else { StartCoroutine( MyAnimationController.playAnimation( audioPauseContinueAnimator, "play" ) ); currentAudio.UnPause(); } } }
private void ReproducePauseContinueBtns(string stateName) { if (stateName == "init") { StartCoroutine( MyAnimationController.playAnimation( audioPauseContinueAnimator, "donotletcontinue" ) ); } else if (stateName == "play") { StartCoroutine( MyAnimationController.playAnimation( audioPauseContinueAnimator, "play" ) ); } }