//private static void OnExcuteTask(NormalTask taskInfo) //{ // if (taskInfo.CompleteConditionList.Count <= 1) // { //目录没有组合条件 // TaskCompleteCondition taskCompleteCondition = taskInfo.CompleteConditionList[0]; // TaskCompleteAttribute taskCompleteAttribute = taskCompleteCondition.GetType().GetCustomAttributes(typeof(TaskCompleteAttribute), true)[0] as TaskCompleteAttribute; // switch (taskCompleteAttribute.CompleteMode) // { // case TaskCompleteMode.CompletedByDialog: // TalkUIHelper.OnStartTalk((long)taskCompleteCondition.TaskCompleteData); // break; // case TaskCompleteMode.CompletedBySceneID: // long sceneID = (long)taskCompleteCondition.TaskCompleteData; // ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); // CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID); // break; // //case TaskCompleteMode.CompletedByEvents: // // EventGameUIAssist.BeginEventGame((long)taskCompleteCondition.TaskCompleteData); // // break; // case TaskCompleteMode.CompletedByItem: // GameEvents.TaskEvents.OnShowCollectionTaskDetail.SafeInvoke(taskInfo, ShowSceneInBigWorld); // break; // case TaskCompleteMode.CompleteByReasonID: // ReasoningUILogic.ShowReasonUIById((long)taskCompleteCondition.TaskCompleteData); // break; // case TaskCompleteMode.CompleteByScanID: // long scanID = (long)taskCompleteCondition.TaskCompleteData; // ChapterInfo scanTaskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); // CommonHelper.OpenEnterGameSceneUI(scanID, scanTaskBelongChapterInfo, taskInfo.TaskConfID); // break; // default: // break; // } // } // else // { // TaskCompleteCondition c_items = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteItems)); // if (null != c_items) // { // TaskCompleteCondition c_scene = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteByScene)); // Action<long> close_act = null; // if (null != c_scene) // { // close_act = (task_conf_id) => // { // long task_config_id = task_conf_id; // long sceneID = (long)c_scene.TaskCompleteData; // ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); // CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID); // }; // } // GameEvents.TaskEvents.OnShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); // } // } //} private static void OnExcuteTask(NormalTask taskInfo) { if (taskInfo.CompleteConditionList.Count <= 1) { //目录没有组合条件 TaskCompleteCondition taskCompleteCondition = taskInfo.CompleteConditionList[0]; TaskCompleteAttribute taskCompleteAttribute = taskCompleteCondition.GetType().GetCustomAttributes(typeof(TaskCompleteAttribute), true)[0] as TaskCompleteAttribute; switch (taskCompleteAttribute.CompleteMode) { case TaskCompleteMode.CompletedByDialog: { TalkUIHelper.OnStartTalk((long)taskCompleteCondition.TaskCompleteData); } break; case TaskCompleteMode.CompletedBySceneID: { Action <long> close_act = null; close_act = (task_conf_id) => { long sceneID = (long)taskCompleteCondition.TaskCompleteData; ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID); }; GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); } break; //case TaskCompleteMode.CompletedByEvents: // EventGameUIAssist.BeginEventGame((long)taskCompleteCondition.TaskCompleteData); // break; case TaskCompleteMode.CompletedByItem: { GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, ShowSceneInBigWorld); } break; case TaskCompleteMode.CompleteByReasonID: { Action <long> close_act = null; close_act = (task_conf_id) => { ReasoningUILogic.ShowReasonUIById((long)taskCompleteCondition.TaskCompleteData); }; GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); } break; case TaskCompleteMode.CompleteByCombinePropID: { Action <long> close_act = null; close_act = (task_conf_id) => { long[] ids = ConfTask.Get(task_conf_id).conditionPropExIds; if (ids.Length > 0) { FrameMgr.OpenUIParams uiParams = new FrameMgr.OpenUIParams(UIDefine.UI_COMBINE); uiParams.Param = ids[0]; EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(uiParams); } else { EngineCoreEvents.UIEvent.ShowUIEvent.SafeInvoke(UIDefine.UI_COMBINE); } }; GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); } break; case TaskCompleteMode.CompleteByScanID: { Action <long> close_act = null; close_act = (task_conf_id) => { long scanID = (long)taskCompleteCondition.TaskCompleteData; ChapterInfo scanTaskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); CommonHelper.OpenEnterGameScanUI(scanID, scanTaskBelongChapterInfo, taskInfo.TaskConfID); }; GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); } break; default: break; } } else { TaskCompleteCondition c_items = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteItems)); if (null != c_items) { TaskCompleteCondition c_scene = taskInfo.CompleteConditionList.Find((item) => item.GetType() == typeof(TaskCompleteByScene)); Action <long> close_act = null; if (null != c_scene) { close_act = (task_conf_id) => { long task_config_id = task_conf_id; long sceneID = (long)c_scene.TaskCompleteData; ChapterInfo taskBelongChapterInfo = GetTaskBelongChapter(taskInfo.TaskConfID); CommonHelper.OpenEnterGameSceneUI(sceneID, taskBelongChapterInfo, taskInfo.TaskConfID); }; } GameEvents.TaskEvents.OnTryShowCollectionTaskDetail.SafeInvoke(taskInfo, close_act); } } }
private void OnGUI() { if (!needShowGUI) { return; } if (enable) { GUILayout.BeginArea(new Rect(10, gui_start_y, 300, Screen.height)); scene_txt = GUILayout.TextField(scene_txt, GUILayout.Width(150), GUILayout.Height(40)); if (GUILayout.Button("seek", GUILayout.Width(150), GUILayout.Height(40))) { if (!string.IsNullOrEmpty(scene_txt)) { long scene_id; if (long.TryParse(scene_txt, out scene_id)) { //GameIAPModule.Instance.OnTransactionDone.SafeInvoke(ConfCharge.Get(scene_id).desc); CommonHelper.OpenEnterGameSceneUI(scene_id); } } } progresssTex = GUILayout.TextField(progresssTex, GUILayout.Width(150), GUILayout.Height(40)); if (GUILayout.Button("progresssTex", GUILayout.Width(150), GUILayout.Height(40))) { SeekerGame.NewGuid.GuidNewManager.Instance.TestProgressIndex(int.Parse(progresssTex)); } if (GUILayout.Button("SkipCurrentCapter", GUILayout.Width(150), GUILayout.Height(40))) { GameEvents.UIEvents.UI_StartCartoon_Event.OnSkipCurrentCapter.SafeInvoke(); } if (GUILayout.Button("EnterCartoon", GUILayout.Width(150), GUILayout.Height(40))) { FrameMgr.OpenUIParams param = new FrameMgr.OpenUIParams(UIDefine.UI_COMICS_1); param.Param = ConfCartoonScene.Get(40008).sceneInfoIds[0]; EngineCoreEvents.UIEvent.ShowUIEventWithParam.SafeInvoke(param); } buildName = GUILayout.TextField(buildName, GUILayout.Width(150), GUILayout.Height(40)); if (GUILayout.Button("UnLock", GUILayout.Width(150), GUILayout.Height(40))) { GameEvents.BigWorld_Event.OnUnLock.SafeInvoke(buildName); } if (GUILayout.Button("EnterTalk", GUILayout.Width(150), GUILayout.Height(40))) { SceneModule.Instance.EnterExhibitionHallScene(); //PresuadeUILogic.Show(1000); //ReasoningUILogic.ShowReasonUIById(1); //GameEvents.UIEvents.UI_GameEntry_Event.OnNewPoliceEffect.SafeInvoke(true); //TalkUIHelper.OnStartTalk(int.Parse(buildName)); //GameEvents.UIEvents.UI_GameEntry_Event.OnLockMainIcon.SafeInvoke(int.Parse(buildName),true); } if (GUILayout.Button("ShowReasonUIById", GUILayout.Width(150), GUILayout.Height(40))) { ///PresuadeUILogic.Show(1000); ReasoningUILogic.ShowReasonUIById(1); //GameEvents.UIEvents.UI_GameEntry_Event.OnNewPoliceEffect.SafeInvoke(true); //TalkUIHelper.OnStartTalk(int.Parse(buildName)); //GameEvents.UIEvents.UI_GameEntry_Event.OnLockMainIcon.SafeInvoke(int.Parse(buildName),true); } if (GUILayout.Button("SkyeyeUILogic", GUILayout.Width(150), GUILayout.Height(40))) { SkyeyeUILogic.Show(); } GUILayout.EndArea(); } }