Ejemplo n.º 1
0
    public void LogOff()
    {
        if (m_Params != null)
        {
            return;
        }
        m_Params = true;
        try
        {
            WndManager.Instance.Clear();
        }
        catch {
        }
        try
        {
            NetServices.Instance.ClearCmdAndHandler();
            NetServices.Instance.Disconnect();
        }
        catch {
        }

        LogicRuntimeData ld = LogicFlowManager.GetLogic(LogicType.LOGIC_LOGON);

        ActiveLogic(ld);
        try
        {
            tagReturnLogonEvent pEvent = new tagReturnLogonEvent();
            MsgEventHandle.HandleMsg(pEvent);
            SDKMgr.Instance.Logout();
        }
        catch {
        }
    }
Ejemplo n.º 2
0
    public void GlobalInit()
    {
//#if UNITY_EDITOR
        LogicRuntimeData ld = LogicFlowManager.GetLogic(ResManager.ENABLE_RESOURCES ? LogicType.LOGIC_INIT : LogicType.LOGIC_UPDATE);

//#else
//        LogicRuntimeData ld = LogicFlowManager.GetLogic(LogicType.LOGIC_UPDATE);
//#endif
        ActiveLogic(ld);
    }
Ejemplo n.º 3
0
    void CheckAction()
    {
        if (LogicAction == Action.ACTION_NONE)
        {
            return;
        }

        if (LogicAction == Action.ACTION_FORWARD)
        {
            LogicRuntimeData ld = LogicFlowManager.GetForwardLogic(m_LogicData.Type);
            if (ld == null)
            {
                LogMgr.Log("Logic forward failed.");
            }
            ActiveLogic(ld);
        }
        else if (LogicAction == Action.ACTION_BACK)
        {
            LogicRuntimeData ld = LogicFlowManager.GetBackLogic(m_LogicData.Type);
            if (ld == null)
            {
                LogMgr.Log("Logic back failed.");
            }
            ActiveLogic(ld);
        }
        else if (LogicAction == Action.ACTION_SHUTDOWN)
        {
            SceneMain.Instance.Shutdown();
        }
        else if (LogicAction == Action.ACTION_TOSCENE)
        {
            LogicRuntimeData ld = LogicFlowManager.GetLogic(LogicType.LOGIC_SCENE);
            if (ld == null)
            {
                LogMgr.Log("Skip to scene failed.");
            }
            ActiveLogic(ld);
        }
        LogicAction = Action.ACTION_NONE;
    }