Fixed Bug Jump Last Video
parent
11e215f7da
commit
246882573f
|
@ -196,15 +196,19 @@ public class GameManager : MonoBehaviour
|
|||
if (videoControl.IsCanPlayMP4())
|
||||
{
|
||||
videoControl.PlayMP4();
|
||||
if (!videoControl.IsCanPlayMP4())// 播放到了最后一个视频, 自动播放End动画
|
||||
{
|
||||
brainTrans.gameObject.SetActive(false);
|
||||
videoControl.PlayEndVideo();
|
||||
videoControl.OnPlayFinished += ResetToGameStart;
|
||||
}
|
||||
videoControl.OnPlayFinished += TryToPlayEndAnim;
|
||||
}
|
||||
}
|
||||
}
|
||||
private void TryToPlayEndAnim()
|
||||
{
|
||||
videoControl.OnPlayFinished -= TryToPlayEndAnim;
|
||||
if (videoControl.IsCanPlayMP4())// 播放到了最后一个视频, 自动播放End动画
|
||||
return;
|
||||
brainTrans.gameObject.SetActive(false);
|
||||
videoControl.PlayEndVideo();
|
||||
videoControl.OnPlayFinished += ResetToGameStart;
|
||||
}
|
||||
private void ResetToGameStart()
|
||||
{
|
||||
videoControl.OnPlayFinished -= ResetToGameStart;
|
||||
|
|
Loading…
Reference in New Issue