/// <summary>
 /// 是否事件执行触发
 /// </summary>
 /// <param name="mType"></param>
 /// <param name="gObj"></param>
 /// <returns></returns>
 public bool IsGuideTrigger(ButtonTriggerType mType, GameObject gObj)
 {
     foreach (GuideTaskBase task in GuideTaskExecuteList)
     {
         if (task.taskType != GuideTaskType.ForceClickTask)
         {
             continue;
         }
         GuideForceClick click = (GuideForceClick)task;
         if (click.IsGuideTrigger(mType, gObj))
         {
             return(true);
         }
     }
     return(false);
 }
Example #2
0
    private void ExecuteNextGuide()
    {
        int taskId = GuideModel.singleton.NowTaskId;

        if (!GameData <DataGuideParentTaskInfo> .dataMap.ContainsKey(taskId))
        {
            return;
        }
        List <int> idList   = GameData <DataGuideParentTaskInfo> .dataMap[taskId].ChildTaskId;
        List <int> typeList = GameData <DataGuideParentTaskInfo> .dataMap[taskId].ChildTaskType;

        for (int i = 0; i < typeList.Count; i++)
        {
            GuideTaskBase  task  = null;
            EGuideTaskType eType = (EGuideTaskType)typeList[i];
            switch (eType)
            {
            case EGuideTaskType.ForceClickTask:
                task = new GuideForceClick(idList[i], eType, this.mRoot.gameObject);
                break;

            case EGuideTaskType.TipTask:
                task = new GuideTipTask(idList[i], eType, this.mRoot.gameObject);
                break;

            case EGuideTaskType.PopTipWindowTask:
                task = new GuidePopTipWindowTask(idList[i], eType, this.mRoot.gameObject);
                break;

            case EGuideTaskType.ShowTipTask:
                task = new GuideShowTipContinueTask(idList[i], eType, this.mRoot.gameObject);
                break;

            case EGuideTaskType.SelectableTask:
                task = new GuideSelectableTask(idList[i], eType, this.mRoot.gameObject);
                break;
            }
            task.EnterTask();
            GuideModel.singleton.GuideTaskExecuteList.Add(task);
        }
    }
Example #3
0
        /// <summary>
        /// 或许模块要执行的Id
        /// </summary>
        private void ExecuteNextGuide()
        {
            int taskId = GamePlayGuideModel.Instance.NowTaskId;

            if (!ConfigReader.GuideTaskMgrInfoDict.ContainsKey(taskId))
            {
                return;
            }
            List <int> idList   = ConfigReader.GuideTaskMgrInfoDict[taskId].ChildTaskId;
            List <int> TypeList = ConfigReader.GuideTaskMgrInfoDict[taskId].ChildTaskType;

            for (int tp = 0; tp < TypeList.Count; tp++)
            {
                GuideTaskBase task = null;
                GuideTaskType type = (GuideTaskType)TypeList[tp];
                switch (type)
                {
                case GuideTaskType.ClickButtonTask:
                    task = new GuideClickButtonTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.PathTask:
                    task = new GuidePathTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.TimeCtrlTask:
                    task = new GuideTimeCtrlTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.MoveCameraTask:
                    task = new GuideCameraTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.TipTask:
                    task = new GuideTipTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.PopTipTask:
                    task = new GuidePopTipTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.ObstructTask:
                    task = new GuideObstructTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.VoiceTask:
                    task = new GuideVoiceTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.ObjFlashTask:
                    task = new GuideFlashTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.ObjShowTask:
                    task = new GuideShowObjTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.AbsorbTask:
                    task = new GuideAbsorbTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.SenderSoldierTask:
                    task = new GuideSendNpcTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.SenderHeroTask:
                    task = new GuideSendHeroTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.KillTask:
                    task = new GuideKillTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.RewardTipTask:
                    task = new GuideRewardTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.ForceClickTask:
                    task = new GuideForceClick(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.ScreenClickTask:
                    task = new GuideScreenClickTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.KillHeroTask:
                    task = new GuideKillHeroTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.GetHeroTask:
                    task = new GuideGetHeroTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.GetGuideToAdGuide:
                    task = new GuideToAdGuideTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.LevelToBuyRunes:
                    task = new GuideLevelToBuyRuneTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.GetRuneTask:
                    task = new GuideGetRuneTask(idList[tp], type, mRoot.gameObject);
                    break;

                case GuideTaskType.EquipRuneTask:
                    task = new GuideEquipRuneTask(idList[tp], type, mRoot.gameObject);
                    break;
                }
                task.EnterTask();
                GamePlayGuideModel.Instance.GuideTaskExecuteList.Add(task);
            }
        }