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