예제 #1
0
    public void UpdatePerSec()
    {
        if (mStageT == null)
        {
            return;
        }

        //是不是神秘商店;
        if (StageModule.IsMysteriousShop(mStageT.m_stageid))
        {
            SpecialStage ss = ObjectSelf.GetInstance().BattleStageData.GetSpecialStageData();

            if (ss.m_Time <= 0)
            {
                mGo.SetActive(false);
            }

            return;
        }

        switch (StageModule.GetStageStageType(mStageT))
        {
        case EM_STAGE_STAGETYPE.MAIN:
        case EM_STAGE_STAGETYPE.SIDE:
            break;

        case EM_STAGE_STAGETYPE.MYSTERIOUS:
            //神秘关卡计时;

            break;

        case EM_STAGE_STAGETYPE.SPECIAL:
            //特殊关卡计时;
            SpecialStage ss = ObjectSelf.GetInstance().BattleStageData.GetSpecialStageData();

            if (ss.m_Time <= 0)
            {
                mGo.SetActive(false);
            }
            break;

        case EM_STAGE_STAGETYPE.ACTIVE:
            break;

        case EM_STAGE_STAGETYPE.BOSS:
            break;

        case EM_STAGE_STAGETYPE.LITMIT_TIMES:
            break;

        default:
            break;
        }
    }
예제 #2
0
    void OnLevelItemClick(int stageId)
    {
        //判断是否是神秘商店(不在关卡表中就是神秘商店),是的话打开神秘商店界面;
        if (StageModule.IsMysteriousShop(stageId))
        {
            UI_HomeControler.Inst.AddUI(UI_MysteriousShop.Path);

            return;
        }

        //判断当前关卡是否开启;
        if (ObjectSelf.GetInstance().BattleStageData.IsStageOpen(stageId))
        {
            CurLevelID = stageId;
        }
        else
        {
            string difStr = "";
            switch (mDifficutType)
            {
            case EM_STAGE_DIFFICULTTYPE.NONE:
                break;

            case EM_STAGE_DIFFICULTTYPE.NORMAL:
                difStr = GameUtils.getString("fight_stageselect_difficulty1");
                break;

            case EM_STAGE_DIFFICULTTYPE.HARD:
                difStr = GameUtils.getString("fight_stageselect_difficulty2");
                break;

            case EM_STAGE_DIFFICULTTYPE.HARDEST:
                difStr = GameUtils.getString("fight_stageselect_difficulty3");
                break;

            default:
                break;
            }

            string        preChapterName = "";
            StageTemplate stageT         = StageModule.GetStageTemplateById(stageId);
            if (stageT.m_premissionid != -1)
            {
                StageTemplate premStageT = StageModule.GetStageTemplateById(stageT.m_premissionid);
                preChapterName = GameUtils.getString(premStageT.m_stagename);
            }

            InterfaceControler.GetInst().AddMsgBox(string.Format(GameUtils.getString("fight_stageselect_tip3"), difStr, preChapterName));
        }
    }