Ejemplo n.º 1
0
    private void UpdateHideState()
    {
        if (mCurStep < 0 || mCurStep >= mSteps.Count)
        {
            return;
        }
        GuideStepTableItem node   = mSteps[mCurStep];
        UIWindow           window = WindowManager.Instance.GetUI(node.window);

        if (window == null)
        {
            return;
        }
        if ((int)CTRL_FIND_TYPE.FIND_TYPE_QUEST_SELECT_ID == node.param1)
        {
            UIQuestForm quest = (UIQuestForm)window;

            mHide = (quest.GetCurrentID() != node.param2);
        }
        else if ((int)CTRL_FIND_TYPE.FIND_TYPE_STAGE_SELECT_ID == node.param1)
        {
            UIStageList stage = (UIStageList)window;

            mHide = (stage.GetCurrentID() != node.param2);
        }
        else
        {
            mHide = false;
        }
    }
Ejemplo n.º 2
0
    //打开翻牌界面
    public void OnOpenUI(string uiName)
    {
        if (!DataManager.UITable.ContainsKey(uiName))
        {
            GameDebug.Log("OnOpenUI 没有找到UI :" + uiName);
            return;
        }
        int condtion = -1;

        if (uiName == "quest")
        {
            UIQuestForm quest = WindowManager.Instance.GetUI(uiName) as UIQuestForm;
            condtion = quest.GetCurrentID();
        }
        else if (uiName == "stagelist")
        {
            UIStageList stagelist = WindowManager.Instance.GetUI(uiName) as UIStageList;
            condtion = stagelist.GetCurrentID();
        }

        //else if (uiName == "mainmap")
        //{
        //     WorldMapModule mWorldMapModule = ModuleManager.Instance.FindModule<WorldMapModule>();
        //     if (mWorldMapModule!= null)
        //         condtion = mWorldMapModule.GuideResId;
        //}
        UITableItem item = DataManager.UITable[uiName] as UITableItem;

        if (!mGuides.ContainsKey(GUIDE_TYPE.GUIDE_OPEN_UI))
        {
            return;
        }
        List <GuideTableItem> childs = mGuides[GUIDE_TYPE.GUIDE_OPEN_UI];

        for (int i = 0; i < childs.Count; ++i)
        {
            if (childs[i].param == item.resID)
            {
                if (CheckAndBeginGuide(childs[i], condtion))
                {
                    LogOut("打开界面 name = " + uiName + " 触发引导ID= " + childs[i].id.ToString());
                    return;
                }
            }
        }
    }