// Token: 0x06006B4D RID: 27469 RVA: 0x001E1928 File Offset: 0x001DFB28
        public IPlayerContextNetworkClient CreateNetWorkClient()
        {
            if (GameManager.Instance == null)
            {
                Debug.LogError("GameLogic4TargetProject.CreateNetWorkClinet GameManager.Instance is null.");
                return(null);
            }
            if (GameManager.Instance.PlayerContext == null)
            {
                Debug.LogError("GameLogic4TargetProject.CreateNetWorkClinet GameManager.Instance.PlayerContext is null.");
                return(null);
            }
            ProjectLPlayerContextWrapper handler = new ProjectLPlayerContextWrapper(GameManager.Instance.PlayerContext);

            return(new NetWorkClient(ClientFactory.CreateClient(handler, null)));
        }
Example #2
0
    public static int get_m_playerContext(IntPtr l)
    {
        int result;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, projectLPlayerContextWrapper.m_luaExportHelper.m_playerContext);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #3
0
    public static int OnDisconnected(IntPtr l)
    {
        int result;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            projectLPlayerContextWrapper.OnDisconnected();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #4
0
    public static int set_m_playerContext(IntPtr l)
    {
        int result;

        try
        {
            ProjectLPlayerContextWrapper      projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            IPlayerContextNetworkEventHandler playerContext;
            LuaObject.checkType <IPlayerContextNetworkEventHandler>(l, 2, out playerContext);
            projectLPlayerContextWrapper.m_luaExportHelper.m_playerContext = playerContext;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #5
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            IPlayerContextNetworkEventHandler playerContext;
            LuaObject.checkType <IPlayerContextNetworkEventHandler>(l, 2, out playerContext);
            ProjectLPlayerContextWrapper o = new ProjectLPlayerContextWrapper(playerContext);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #6
0
    public static int OnLoginBySessionTokenAck(IntPtr l)
    {
        int result2;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            int result;
            LuaObject.checkType(l, 2, out result);
            projectLPlayerContextWrapper.OnLoginBySessionTokenAck(result);
            LuaObject.pushValue(l, true);
            result2 = 1;
        }
        catch (Exception e)
        {
            result2 = LuaObject.error(l, e);
        }
        return(result2);
    }
Example #7
0
    public static int OnError(IntPtr l)
    {
        int result;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            int err;
            LuaObject.checkType(l, 2, out err);
            string excepionInfo;
            LuaObject.checkType(l, 3, out excepionInfo);
            projectLPlayerContextWrapper.OnError(err, excepionInfo);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #8
0
    public static int OnMessage(IntPtr l)
    {
        int result;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            object msg;
            LuaObject.checkType <object>(l, 2, out msg);
            int msgId;
            LuaObject.checkType(l, 3, out msgId);
            projectLPlayerContextWrapper.OnMessage(msg, msgId);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Example #9
0
    public static int OnLoginByAuthTokenAck(IntPtr l)
    {
        int result2;

        try
        {
            ProjectLPlayerContextWrapper projectLPlayerContextWrapper = (ProjectLPlayerContextWrapper)LuaObject.checkSelf(l);
            int result;
            LuaObject.checkType(l, 2, out result);
            bool needRedirect;
            LuaObject.checkType(l, 3, out needRedirect);
            string sessionToken;
            LuaObject.checkType(l, 4, out sessionToken);
            projectLPlayerContextWrapper.OnLoginByAuthTokenAck(result, needRedirect, sessionToken);
            LuaObject.pushValue(l, true);
            result2 = 1;
        }
        catch (Exception e)
        {
            result2 = LuaObject.error(l, e);
        }
        return(result2);
    }