Exemplo n.º 1
0
    public void TriggerSceneState(GameLogicSceneType sceneType)
    {
        for (int i = 0; i < m_CurrentMissionStepList.Count; ++i)
        {
            MissionStepConfig elemStep = m_CurrentMissionStepList[i];

            if (elemStep.SceneId == (int)(sceneType))
            {
                HandleTarget target = HandleTarget.GetHandleTarget(null);
                if (LimitMethods.HandleLimitExec(target, elemStep.SceneLimitId, null))
                {
                    FuncMethods.HandleFuncExec(target, elemStep.SceneFuncId, null);
                }
            }
            HandleTarget target1 = HandleTarget.GetHandleTarget(null);
            if (LimitMethods.HandleLimitExec(target1, elemStep.CompleteLimitId, null))
            {
                FuncMethods.HandleFuncExec(target1, elemStep.CompleteFuncId, null);
            }
        }

        bool         isMissionComplete = false;
        HandleTarget target2           = HandleTarget.GetHandleTarget(null);

        if (LimitMethods.HandleLimitExec(target2, m_CurrentMission.CompleteLimitId, null))
        {
            isMissionComplete = true;
            FuncMethods.HandleFuncExec(target2, m_CurrentMission.CompleteFuncId, null);
        }

        if (isMissionComplete)
        {
            m_OnMissioinComplete(this);
        }
    }
Exemplo n.º 2
0
    public void TriggerSceneState(GameLogicSceneType sceneType)
    {
        for (int i = 0; i < m_CurrentMissionStepList.Count; ++i)
        {
            MissionStepConfig elemStep = m_CurrentMissionStepList[i];

            if (elemStep.SceneId == (int)(sceneType))
            {
                HandleTarget target = HandleTarget.GetHandleTarget(null);
                if (LimitMethods.HandleLimitExec(target, elemStep.SceneLimitId, null))
                {
                    FuncMethods.HandleFuncExec(target, elemStep.SceneFuncId, null);
                }
            }
            HandleTarget target1 = HandleTarget.GetHandleTarget(null);
            if (LimitMethods.HandleLimitExec(target1, elemStep.CompleteLimitId, null))
            {
                FuncMethods.HandleFuncExec(target1, elemStep.CompleteFuncId, null);
            }
        }

        bool isMissionComplete = false;
        HandleTarget target2 = HandleTarget.GetHandleTarget(null);
        if (LimitMethods.HandleLimitExec(target2, m_CurrentMission.CompleteLimitId, null))
        {
            isMissionComplete = true;
            FuncMethods.HandleFuncExec(target2, m_CurrentMission.CompleteFuncId, null);
        }

        if (isMissionComplete)
        {
            m_OnMissioinComplete(this);
        }
    }