/// <summary> /// 图片引导 /// </summary> /// <param name="newGuideConfigData"></param> private void StartPicStep(EctGuideStepConfigData stepItem) { if (stepItem.GuidePicture == null) { return; } if (m_picIndex < stepItem.GuidePicture.Length) { m_maskWithCollider.SetButtonColliderActive(true); var picPrefab = stepItem.GuidePicture[m_picIndex]; if (picPrefab != null) { m_guidePic = CreatObjectToNGUI.InstantiateObj(picPrefab, this.transform); } } else { m_maskWithCollider.SetButtonColliderActive(false); if (m_guidePic != null) { Destroy(m_guidePic); } m_picIndex = 0; NetServiceManager.Instance.InteractService.SendEctypeDialogOver(); } }
// 初始化对话数据 public void InitDialogPanel(EctGuideStepConfigData item) { m_curGroupIndex = 0; BattleUIManager.Instance.ShowStoryCover(true); m_curGuideData = item; ClickSign.text = LanguageTextManager.GetString("IDS_H1_218"); m_originCamPos = BattleManager.Instance.FollowCamera.transform.position; BattleManager.Instance.BlockPlayerToIdle = true; StartCoroutine(ChangeCameraToDialog()); }
private void FinishGuideStep(INotifyArgs arg) { StopSlowMotionAction(); StopCoroutine("ReActiveGuideBtn"); m_isSlowMotionStatus = false; ClearGuideStepUIEffect(); EctGuideManager.Instance.SetGuideBtnEnable(true); m_stepItem = null; m_picIndex = 0; }
/// <summary> /// 显示剧情对话内容 /// </summary> /// <param name="newGuideConfigData"></param> private void StartPicStep(EctGuideStepConfigData stepItem) { if (stepItem.GuidePicture == null) { return; } m_stepItem = stepItem; m_picIndex = 0; if (m_picIndex < stepItem.GuidePicture.Length) { var picPrefab = m_stepItem.GuidePicture[m_picIndex]; if (picPrefab != null) { m_picIndex = 1; m_guidePicBtn = CreatObjectToNGUI.InstantiateObj(picPrefab, this.transform).GetComponent <LocalButtonCallBack>(); m_guidePicBtn.SetCallBackFuntion((obj) => { if (m_guidePicBtn != null) { Destroy(m_guidePicBtn.gameObject); } m_picIndex++; StartPicStep(stepItem); }); } } else { if (m_guidePicBtn != null) { Destroy(m_guidePicBtn.gameObject); } m_picIndex = 0; SMsgInteractCOMMON_CS msgInteract; msgInteract.dwNPCID = 0; msgInteract.byOperateType = 2; msgInteract.dwParam1 = 2; msgInteract.dwParam2 = 0; msgInteract.byIsContext = 0; SMsgInteractCOMMONContext_CS msgContext; msgContext.szContext = new byte[32]; NetServiceManager.Instance.InteractService.SendInteractCOMMON(msgInteract, msgContext); } }
private void ExecuteGuideStep() { m_stepItem = EctGuideManager.Instance.CurrGuideStepData.EctGuideStepConfigData; if (m_stepItem.StepSound != "0") { SoundManager.Instance.PlaySoundEffect(m_stepItem.StepSound); } EctGuideManager.Instance.CurrGuideStepData.IsExcuting = true; RefreshGuideStepUI(false); switch (m_stepItem.StepType) { case 0: //对话向导 ShowGuideDialog(); break; case 9: //图片引导 StartPicStep(m_stepItem); break; default: //判断是否减速处理 switch (m_stepItem.SlowMonitorType) { case 1: //子弹命中监听 //监听子弹打中消息 AddEventHandler(EventTypeEnum.HitMonsterForGuide.ToString(), BulletHitSlowMotionCheck); break; case 2: //怪物破防监听 //监听怪物破防消息 AddEventHandler(EventTypeEnum.BossBreakProtectForGuide.ToString(), BossBreakProtectSlowMotionCheck); break; default: break; } break; } }