public void OnMoveToCenter() { if (isCenter) { return; } //Debuger.LogWarning (string.Format("OnMoveToCenter{0}", chapterID)); isCenter = true; HideAllJuanzhou(); KHAudioManager.PlaySound(9906); sndIns = KHAudioManager.PlaySound(40000 + _resourceChapterId); NGUITools.SetActive(juanzhou, true); UIPlayAnimation pa = AdapterHost.GetComponent <UIPlayAnimation>(); pa.clipName = string.Format("ChapterItemOnCenterAni{0}Enter", _resourceChapterId); pa.playDirection = AnimationOrTween.Direction.Forward; pa.Play(true, false); DuplicateModel model = KHPluginManager.Instance.GetPluginByName(DuplicatePlugin.pluginName).Model as DuplicateModel; model.CurChapterID = _chapterID; if (ExpandPackManager.isValid(1, _resourceChapterId)) { NGUITools.SetActive(goNeedDownload, false); } else { NGUITools.SetActive(goNeedDownload, true); if (ExpandPackManager.isNeedUpdate(1, _resourceChapterId)) { lblNeedDonwload.text = "需更新扩展包"; } else { lblNeedDonwload.text = "需下载扩展包"; } } if (_isShowScrollEx) { scrollExComp.PlayEnterAnim(); } }
public void OnClick() { if ((!isCenter || isExitAnimPlaying) && !MessageManager.Instance.IsActivate) { return; } KHUIManager.getInstance().dispatchClickToGuideEvent(this.tag); var c = KHDataManager.CONFIG.getChapterItemConfig(_chapterID); if (c == null) { Debuger.LogError(string.Format("没有找到章节ID为:{0}的配置!!!!!!!!!!", _chapterID)); return; } KHAudioManager.PlaySound(9907); if (!ExpandPackManager.isValid(1, _resourceChapterId)) { KHPluginManager.Instance.SendMessage(ExpandPackPlugin.PluginName, "ExpandPack.show", new ExpandPackView.ShowArg() { type = 1, data = _resourceChapterId }); return; } if (clickItemPlayAnimSwitch == 1) // 1只播有含有卷轴动画Item的退出动画, 目前只有忍界大战都卷轴动画 { // 播完动画再跳转 curEvtCount = 0; if (_isShowScrollEx) { isExitAnimPlaying = true; KHUIManager.Instance.Dispatcher.removeEventListener(LevelSelectModel.CHAPTER_ITEM_PLAY_EXIT_ANIM_COMPLETE, OnExitAnimPlayComplete); KHUIManager.Instance.Dispatcher.addEventListener(LevelSelectModel.CHAPTER_ITEM_PLAY_EXIT_ANIM_COMPLETE, OnExitAnimPlayComplete); HideAllJuanzhou(); } else { JumpToDungeonView(); } } else if (clickItemPlayAnimSwitch == 2) // 卷轴和人物的退出动画都要播 { // 播完动画再跳转 curEvtCount = 0; isExitAnimPlaying = true; KHUIManager.Instance.Dispatcher.removeEventListener(LevelSelectModel.CHAPTER_ITEM_PLAY_EXIT_ANIM_COMPLETE, OnExitAnimPlayComplete); KHUIManager.Instance.Dispatcher.addEventListener(LevelSelectModel.CHAPTER_ITEM_PLAY_EXIT_ANIM_COMPLETE, OnExitAnimPlayComplete); HideAllJuanzhou(); } else // 不播动画 { JumpToDungeonView(); } MessageManager.Instance.serializeToLocal( new MouseAction(this, RemoteModel.Instance.CurrentTime), MessageManager.DEST_PATH_MOUSE_EVENT); }