Beispiel #1
0
    IEnumerator ShowGuideLeader(GUIDE_COPY_STEP currentstep)
    {
        GameObject main1 = null;
        GameObject obj   = null;

        switch (currentstep)
        {
        case GUIDE_COPY_STEP.SELECT_1:        //副本选择

            player.nextStep = null;
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            //获取PVE按钮
            while (main1 == null)
            {
                main1 = mainLogic.mainController;
                yield return(new WaitForSeconds(waitSecond));
            }
            MainController main = main1.GetComponent <MainController>();
            while (obj == null)
            {
                obj = main.getPVEButton().gameObject;
                yield return(new WaitForSeconds(waitSecond));
            }
            SetKeyObj(obj);
            UpdateKeyObject();
            //下一步消息触发位于MainController(222,13)
            //箭头位置设置
            player.SetRowPositionPS(keyObject);
            player.SetRowActive(true);

            break;

        case GUIDE_COPY_STEP.SELECT_2:

            player.nextStep = null;
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            RecoverKeyObject();
            //获取第一个副本item
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.PVEMainController);
                yield return(new WaitForSeconds(waitSecond));
            }
            PVEMainController pvemain = main1.GetComponent <PVEMainController>();
            while (obj == null)
            {
                obj = pvemain.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = pvemain.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            pvemain.SetPanelListEnable(false);
            //下一步消息触发位于PVEMainController(421,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);
            player.SetRowActive(true);

            break;

        case GUIDE_COPY_STEP.SELECT_3:

            player.nextStep = null;
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <PVEMainController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            //获取第一个小副本item
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.PVESubController);
                yield return(new WaitForSeconds(waitSecond));
            }
            PVESubController pvesub = main1.GetComponent <PVESubController>();
            while (obj == null)
            {
                obj = pvesub.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = pvesub.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            pvesub.SetPanelListEnable(false);
            //下一步消息触发位于PVESubController(239,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);
            player.SetRowActive(true);

            break;

        case GUIDE_COPY_STEP.NONE_1:

            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <PVESubController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            player.nextStep = null;
            //下一步消息触发位于SelectAssistController(126,25)

            break;

        case GUIDE_COPY_STEP.SELECT_4:        //选择助战好友

            RecoverKeyObject();
            player.nextStep = null;
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.SelectAssistController);
                yield return(new WaitForSeconds(waitSecond));
            }
            SelectAssistController sac = main1.GetComponent <SelectAssistController>();
            while (obj == null)
            {
                obj = sac.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = sac.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            sac.SetPanelListEnable(false);
            //下一步消息触发位于SelectAssistController(335,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);
            player.SetRowActive(true);

            break;

        case GUIDE_COPY_STEP.NONE_2:

            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <SelectAssistController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            player.nextStep = null;
            //下一步消息触发位于BattleBeforeController(75,13)

            break;

        case GUIDE_COPY_STEP.SELECT_6:        //开始战斗

            player.nextStep = null;
            player.SetZhaoActive(false);
            player.SetRowActive(false);
            //获取战斗开始按钮
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.BattleBeforeController);
                yield return(new WaitForSeconds(waitSecond));
            }
            BattleBeforeController bbc = main1.GetComponent <BattleBeforeController>();
            while (obj == null)
            {
                obj = bbc.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            SetKeyObj(obj);
            UpdateKeyObject();
            //下一步消息触发位于BattleBeforeController(292,13)
            //箭头位置设置
            player.SetRowPositionS(keyObject);
            player.SetRowActive(true);

            break;

        case GUIDE_COPY_STEP.END:

            RecoverKeyObject();
            GuideManager.Instance.FinishedStep(GuideManager.GUIDE_STEP.COPY1_4);

            break;
        }
    }
Beispiel #2
0
    IEnumerator ShowGuideLeader(GUIDE_COPY_STEP currentstep)
    {
        GameObject main1 = null;
        GameObject obj   = null;

        switch (currentstep)
        {
        case GUIDE_COPY_STEP.LABEL_1:        //武林指导弹出框

            //ShowLabel(0, "(战斗指引框)传闻他曾出现无量山,我们便去打听打听");
            ShowLabel(0, guide_copy_texts[labelIndex++]);
            Debug.Log("战斗指引框 阶段");

            break;

        case GUIDE_COPY_STEP.SELECT_1:        //副本选择

            player.nextStep = null;
            player.DisableRowZhao();
            //获取PVE按钮
            while (main1 == null)
            {
                main1 = mainLogic.mainController;
                yield return(new WaitForSeconds(waitSecond));
            }
            MainController main = main1.GetComponent <MainController>();
            while (obj == null)
            {
                obj = main.getPVEButton().gameObject;
                yield return(new WaitForSeconds(waitSecond));
            }
            SetKeyObj(obj);
            UpdateKeyObject();
            //下一步消息触发位于MainController(201,13)
            //箭头位置设置
            player.SetRowPositionPS(keyObject);

            break;

        case GUIDE_COPY_STEP.SELECT_2:

            player.nextStep = null;
            player.DisableRowZhao();
            RecoverKeyObject();
            //获取第一个副本item
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.PVEMainController);
                yield return(new WaitForSeconds(waitSecond));
            }
            PVEMainController pvemain = main1.GetComponent <PVEMainController>();
            while (obj == null)
            {
                obj = pvemain.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = pvemain.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            pvemain.SetPanelListEnable(false);
            //下一步消息触发位于PVEMainController(340,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);

            break;

        case GUIDE_COPY_STEP.SELECT_3:

            player.nextStep = null;
            player.DisableRowZhao();
            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <PVEMainController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            //获取第一个小副本item
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.PVESubController);
                yield return(new WaitForSeconds(waitSecond));
            }
            PVESubController pvesub = main1.GetComponent <PVESubController>();
            while (obj == null)
            {
                obj = pvesub.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = pvesub.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            pvesub.SetPanelListEnable(false);
            //下一步消息触发位于PVESubController(237,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);

            break;

        case GUIDE_COPY_STEP.NONE_1:

            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <PVESubController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            player.DisableRowZhao();
            player.nextStep = null;
            //下一步消息触发位于SelectAssistController(126,25)

            break;

        case GUIDE_COPY_STEP.LABEL_5:        //助战好友弹出框

            RecoverKeyObject();
            //ShowLabel(0, "(助战好友)有位无量山义士,我们便结伴同行");
            ShowLabel(0, guide_copy_texts[labelIndex++]);
            player.nextStep = NextStep;

            break;

        case GUIDE_COPY_STEP.SELECT_4:        //选择助战好友

            player.nextStep = null;
            player.DisableRowZhao();
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.SelectAssistController);
                yield return(new WaitForSeconds(waitSecond));
            }
            SelectAssistController sac = main1.GetComponent <SelectAssistController>();
            while (obj == null)
            {
                obj = sac.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            tempDraggableGO = sac.gameObject;
            SetKeyObj(obj);
            UpdateKeyObject();
            //拖动列表暂停使用
            sac.SetPanelListEnable(false);
            //下一步消息触发位于SelectAssistController(336,13)
            //箭头位置设置
            player.SetRowPositionGS(keyObject);

            break;

        case GUIDE_COPY_STEP.NONE_2:

            //拖动列表恢复使用
            if (tempDraggableGO != null)
            {
                tempDraggableGO.GetComponent <SelectAssistController>().SetPanelListEnable(true);
            }
            RecoverKeyObject();
            player.DisableRowZhao();
            player.nextStep = null;
            //下一步消息触发位于BattleBeforeController(75,13)

            break;

        case GUIDE_COPY_STEP.LABEL_6:        //阵型调整弹出框

            //ShowLabel(1, "(阵型调整)非我贪生怕死,只为做闺蜜后盾");
            ShowLabel(1, guide_copy_texts[labelIndex++]);
            player.nextStep = NextStep;
            //加入阵型拖动演示动画

            break;

        case GUIDE_COPY_STEP.SELECT_5:        //调整阵型

            player.nextStep = null;
            player.DisableRowZhao();
            player.PlayCopyGuide();
            //队员选择
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.BattleBeforeController);
                yield return(new WaitForSeconds(waitSecond));
            }
            BattleBeforeController bbc1 = main1.GetComponent <BattleBeforeController>();
            while (obj == null)
            {
                obj = bbc1.getGuideCard();
                yield return(new WaitForSeconds(waitSecond));
            }
            SetKeyObj(obj);
            UpdateKeyObject();
            UpdateGameObject(bbc1.getTeamBG2Position());
            UpdateGameObject(bbc1.getTeamBG5Position());

            //下一步消息触发位于UIDragController(118,13)
            //player.SetRowPosition(bbc1.getTeamBG5Position().transform.localPosition);
            //player.SetRowPositionS(bbc1.getGuideRowPosition());

            break;

        case GUIDE_COPY_STEP.SELECT_6:        //开始战斗

            player.nextStep = null;
            RecoverKeyObject();
            player.DisableRowZhao();
            player.StopCopyGuide();
            //获取战斗开始按钮
            while (main1 == null)
            {
                main1 = mainLogic.getController(MainUILogic.ChildIndex.BattleBeforeController);
                yield return(new WaitForSeconds(waitSecond));
            }
            BattleBeforeController bbc = main1.GetComponent <BattleBeforeController>();
            while (obj == null)
            {
                obj = bbc.getGuideItem();
                yield return(new WaitForSeconds(waitSecond));
            }
            SetKeyObj(obj);
            UpdateKeyObject();
            RecoverGameObject(bbc.getTeamBG2Position());
            RecoverGameObject(bbc.getTeamBG5Position());
            //下一步消息触发位于BattleBeforeController(307,13)
            //箭头位置设置
            player.SetRowPositionS(keyObject);

            break;

        case GUIDE_COPY_STEP.END:

            RecoverKeyObject();
            GuideManager.Instance.FinishedStep(GuideManager.GUIDE_STEP.COPY1_1);

            break;
        }
    }