public override void DoAnimation(PPTAnimation ani) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (ani.shapeId != currentBge.shapeId) { return; } if (!currentBge.aniList.Contains(ani)) { currentBge.aniList.Add(ani); } PPTController.isExecuted = true; } if (ani.action == PPTAction.entr) { currentBge.appearTime = ani.slideTime; initImage(currentBge.fileName); } else if (ani.action == PPTAction.exit) { currentBge.endTime = ani.slideTime; img.sprite = null; } }
public override void DoAnimation(PPTAnimation ani) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (ani.shapeId != currentVqa.shapeId) { return; } } if (ani.action == PPTAction.entr) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { currentVqa.appearTime = ani.slideTime; } initVqa(); //player.Play(); //image.texture = player.texture; //player.Pause(); } if (ani.action == PPTAction.exit) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { currentVqa.endTime = ani.slideTime; } GoDie(0); } if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { PPTController.isExecuted = true; } }
public int CompareTo(object obj) { PPTAnimation other = obj as PPTAnimation; if (other == null) { return(1); } return(other.id.CompareTo(id) * -1); }
public override void DoAnimation(PPTAnimation ani) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (ani.shapeId != currentAe.shapeId) { return; } PPTController.isExecuted = true; if (ani.action == PPTAction.entr) { currentAe.appearTime = ani.slideTime; audioSlider.gameObject.SetActive(true); } } if (ani.action == PPTAction.mediacall || ani.action == PPTAction.entr) { try { if (ani.call == PPTCall.play) { play(); } else if (ani.call == PPTCall.togglePause) { Pause(); } else if (ani.call == PPTCall.stop) { source.Stop(); } if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (!currentAe.aniList.Contains(ani)) { currentAe.aniList.Add(ani); } } } catch (Exception e) { Debug.Log(e.Message); } } else if (ani.action == PPTAction.exit) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { currentAe.endTime = ani.slideTime; audioSlider.gameObject.SetActive(false); } source.Stop(); source.clip = null; } }
public override void DoAnimation(PPTAnimation ani) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (ani.shapeId != ie.shapeId) { return; } if (!ie.aniList.Contains(ani)) { ie.aniList.Add(ani); } else { //return; } lastAniId = -1; } Debug.Log(ani.id + " - " + ani.action + " - " + ani.type + " - " + ani.waittime); if (ani.action == PPTAction.entr) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { ie.appearTime = ani.slideTime; PPTController.isExecuted = true; } img.enabled = true; isShowing = true; } else if (ani.action == PPTAction.exit) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { ie.endTime = ani.slideTime; } isShowing = false; img.enabled = false; PPTController.isExecuted = true; } else if (ani.action == PPTAction.emph) { StartCoroutine(ImageEmph()); if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (!ie.aniList.Contains(ani)) { ie.aniList.Add(ani); } lastAniId = ani.id; PPTController.isExecuted = true; } } }
public override void DoAnimation(PPTAnimation ani) { if (ani.shapeId != me.shapeId) { return; } if (ani.action == PPTAction.entr) { if (!isAni) { Camera.main.GetComponent <XT_TouchContorl>().GiveUiValue_new(null); if (SceneModels.instance != null) { SceneModels.instance.openTempParent(); } if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { me.appearTime = ani.slideTime; instance.tempRecordQueue.Clear(); if (m_cvs.activeSelf) { Camera.main.GetComponent <XT_MouseFollowRotation>().To_360(); } } SetModelCam(false); } else { if (pac != null) { pac.ToggleAniObj(true); } } } if (ani.action == PPTAction.exit) { GoDie(0); if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (pac != null) { pac.ToggleAniObj(false); pac.DestroyPPTAniPanel(); pac = null; resetCamera(); Camera.main.GetComponent <XT_MouseFollowRotation>().uicam = ModelUICam; } me.endTime = ani.slideTime; writeRecordDoc(); } } PPTController.isExecuted = true; }
/// <summary> /// 广播动画指令 /// </summary> /// <param name="ani"></param> /// <param name="str"></param> /// <param name="isOnlyCurrentSlide"></param> public void BroadcastAni(PPTAnimation ani, string str = "DoAnimation", bool isOnlyCurrentSlide = true) { if (isOnlyCurrentSlide) { if (currentSlideObj != null) { currentSlideObj.BroadcastMessage(str, ani, SendMessageOptions.DontRequireReceiver); paintPenCanvas.BroadcastMessage(str, ani, SendMessageOptions.DontRequireReceiver); } } else { BroadcastMessage(str, ani, SendMessageOptions.DontRequireReceiver); paintPenCanvas.BroadcastMessage(str, ani, SendMessageOptions.DontRequireReceiver); } }
/// <summary> /// 下一个动画 /// </summary> /// <param name="isToClickAni">是否触发至下一个点击动画</param> public void nextAni(bool isToClickAni = false) { if (currentPPTAnimation == null) { changeSlide(); return; } currentPPTAnimation.slideTime = slideTime; isExecuted = false; if (isToClickAni || lastExecuteTime > currentPPTAnimation.waittime) { BroadcastAni(currentPPTAnimation); lastExecuteTime = 0; } if (currentPPTAnimation.type == PPTActionType.Clicked) { isToClickAni = false; } if (isExecuted || isToClickAni) { currentPPTAnimationIndex++; if (currentPPTAnimations.Length > currentPPTAnimationIndex) { currentPPTAnimation = currentPPTAnimations[currentPPTAnimationIndex]; } else { currentPPTAnimation = null; } } isExecuted = false; if (isToClickAni) { nextAni(true); } }
//IEnumerator videoEnter() { // player.Play(); // yield return new WaitForSecondsRealtime(0.001f); // image.texture = player.texture; // yield return new WaitForSecondsRealtime(0.001f); // image.texture = player.texture; // yield return new WaitForSecondsRealtime(0.001f); // player.Pause(); //} public override void DoAnimation(PPTAnimation ani) { if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (ani.shapeId != ve.shapeId) { return; } } Debug.Log(ani.id + " - " + ani.action + " - " + ani.type + " - " + ani.waittime); if (ani.action == PPTAction.entr) { Debug.Log("video enter"); if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { ve.appearTime = ani.slideTime; isEnterAniDown = true; } else { Play(); //image.enabled = true; //player.Play(); image.texture = player.texture; } //player.Pause(); //source.Stop(); } if (ani.action == PPTAction.mediacall) { try { if (ani.call == PPTCall.play) { Play(); if (ani.playfrom != 0f) { player.time = ani.playfrom; } } else if (ani.call == PPTCall.togglePause) { Pause(); } else if (ani.call == PPTCall.stop) { isEnd = true; image.enabled = false; isPlaying = false; player.Stop(); source.Stop(); } if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (!ve.aniList.Contains(ani)) { ve.aniList.Add(ani); } } } catch (Exception e) { Debug.Log(e.Message); } } else if (ani.action == PPTAction.exit) { ve.endTime = ani.slideTime; player.Stop(); source.Stop(); image.enabled = false; isEnterAniDown = false; PlayButton.SetActive(false); } if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { PPTController.isExecuted = true; } }
/// <summary> /// 初始化动画 /// </summary> /// <param name="ani"></param> public virtual void InitAnimation(PPTAnimation ani) { throw new System.NotImplementedException("Not Implemente <color=Blue>InitAnimationGroup</color>!!!"); }
/// <summary> /// 执行动画 /// </summary> /// <param name="ani"></param> public virtual void DoAnimation(PPTAnimation ani) { //throw new System.NotImplementedException("Not Implemente <color=Blue>DoAnimation</color>!!!"); }
//PPTAnimation nextPPTAnimation; /// <summary> /// 切换幻灯片 /// </summary> void changeSlide() { bool lastone = false; gameObject.GetComponent <PPTResourcePool>().slideSlider.value = pageNum; gameObject.GetComponent <PPTResourcePool>().sliderValueChange(); Time.timeScale = 0; GameFrame = 0; PPTGlobal.pptStatus = PPTGlobal.PPTStatus.change; if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { VqaTopCanvas.BroadcastMessage("closeVqa", SendMessageOptions.DontRequireReceiver); //VqaTopCanvas.SetActive(false); if (slideTotaltimes.ContainsKey(pageNum)) { slideTotaltimes.Remove(pageNum); } slideTotaltimes.Add(pageNum, slideTime); if (isPageRecording) { ToggleCurrentPageRecord(); return; } //Broadcast("GoDie"); currentPPTAnimation = null; isExecuted = false; } slideTime = 0; //if (PPTGlobal.PPTEnv != PPTGlobal.PPTEnvironment.PPTPlayer) //{ //} Broadcast("GoDie"); pageNum++; if (pageNum > PPTGlobal.SLIDE_SUM && PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { pageNum = PPTGlobal.SLIDE_SUM; lastone = true; } //nextGroup = null; //nextPPTAnimation = null; if (pageNum > 0 && pageNum <= PPTGlobal.SLIDE_SUM) { currentSlideObj = PPTResourcePool.slideObjs[pageNum]; currentSlide = PPTResourcePool.slides[pageNum]; if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { if (PPTResourcePool.slides[pageNum].anis != null && PPTResourcePool.slides[pageNum].anis.Length != 0) { currentPPTAnimations = PPTResourcePool.slides[pageNum].anis; currentPPTAnimation = currentPPTAnimations[0]; currentPPTAnimationIndex = 0; } } else { totalTime = currentSlide.totalTime; } //if (currentSlide.animationGroups != null && currentSlide.animationGroups.Length != 0) { // AnimationGroupIndex = 0; // currentGroups = currentSlide.animationGroups; // if (currentGroups[0].type != "Clicked") // { // currentGroup = currentGroups[0]; // AnimationGroupIndex++; // } // else { // nextGroup = currentGroups[0]; // } //} Broadcast("Init"); //UIcameraObj.MoveTo(Vector3.right * PPTGlobal.SLIDE_WIDTH, 1f, 0f); Time.timeScale = 1; //iTween.MoveTo(basePanel.gameObject, iTween.Hash("islocal", true,"x", -Screen.width * pageNum, "time", 1.5f, "oncomplete", "beginSlide", "oncompletetarget", gameObject)); //currentEaseType = getRandowEaseType(); try { basePanel.gameObject.transform.localPosition = new Vector3(-Screen.width * pageNum, -PPTResourcePool.slidePoss[pageNum].y, basePanel.gameObject.transform.localPosition.z); //iTween.MoveTo(basePanel.gameObject, iTween.Hash("islocal", true, "easeType", currentEaseType, "x", -Screen.width * pageNum, "y", -PPTResourcePool.slidePoss[pageNum].y, "time", 2.5f, "oncomplete", "beginSlide", "oncompletetarget", gameObject)); beginSlide(); } catch (Exception e) { Debug.Log(e.Message); Debug.Log(e.StackTrace); } if (lastone && PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { PPTGlobal.pptStatus = PPTGlobal.PPTStatus.play; StartCoroutine(endTipPanelShow()); } } else if (pageNum > PPTGlobal.SLIDE_SUM) { Time.timeScale = 1; if (PPTGlobal.PPTEnv == PPTGlobal.PPTEnvironment.PPTPlayer) { //toggleFuntionPanel(); //ExitButton(); pageNum--; PPTGlobal.pptStatus = PPTGlobal.PPTStatus.play; StartCoroutine(endTipPanelShow()); } else { //pageNum--; PPTGlobal.pptStatus = PPTGlobal.PPTStatus.pause; Broadcast("GoDie"); //PausePlaying(); //结束 ExitButton(); } } }