void Update() { if (isPaused || nowPlayingTake == null) { return; } CurrentTakePlayTime += Time.deltaTime; if (CurrentTakePlayTime >= takeTime) { nowPlayingTake.stopAudio(); nowPlayingTake.NotifyEnd(); if (isLooping) { Execute(nowPlayingTake); } else { nowPlayingTake = null; } } else { nowPlayingTake.NotifyUpdate(); } }
void Update() { if (isPaused || nowPlayingTake == null) { return; } elapsedTime += Time.deltaTime; if (elapsedTime >= takeTime) { nowPlayingTake.stopAudio(); if (isLooping) { Execute(nowPlayingTake); } else { nowPlayingTake = null; } } }