private void OnLoadedSet(object data) { _currVedioSet = (VideoSet)data; if (_currVedioSet == null) { _currVedioSet = new VideoSet(); _currVedioSet.vedioName = _currFileName; _currVedioSet.isPlayed = false; } if (!_currVedioSet.isPlayed) {//开始播放 _isPlaying = true; StartCoroutine(PlayMovie()); } }
private IEnumerator PlayMovie() { _isPlaying = true; //直到播完消失 //Handheld.PlayFullScreenMovie(_currFilePath, Color.black, FullScreenMovieControlMode.Hidden, FullScreenMovieScalingMode.AspectFit); //点击消失 Handheld.PlayFullScreenMovie(_currFilePath, Color.black, FullScreenMovieControlMode.CancelOnInput, FullScreenMovieScalingMode.AspectFit); yield return(new WaitForEndOfFrame()); //恢复背景音乐 if (_isCloseBackGroundMusic) { SoundManager.BgmMute = false; } _isPlaying = false; if (_currVedioSet != null) { _currVedioSet.isPlayed = true; ResDataManager.instance.SaveToLocalCache <VideoSet>(_currVedioSet, _currFileName); _currVedioSet = null; } }