コード例 #1
0
    static int _CreateGameFramework_Message(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 3)
            {
                long arg0 = LuaDLL.tolua_checkint64(L, 1);
                GameFramework.MessageType  arg1 = (GameFramework.MessageType)ToLua.CheckObject(L, 2, typeof(GameFramework.MessageType));
                GameFramework.IMessageBody arg2 = (GameFramework.IMessageBody)ToLua.CheckObject <GameFramework.IMessageBody>(L, 3);
                GameFramework.Message      obj  = new GameFramework.Message(arg0, arg1, arg2);
                ToLua.PushValue(L, obj);
                return(1);
            }
            else if (count == 0)
            {
                GameFramework.Message obj = new GameFramework.Message();
                ToLua.PushValue(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: GameFramework.Message.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }
コード例 #2
0
 static int ToString(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         GameFramework.Message obj = (GameFramework.Message)ToLua.CheckObject(L, 1, typeof(GameFramework.Message));
         string o = obj.ToString();
         LuaDLL.lua_pushstring(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
コード例 #3
0
    static int get_body(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GameFramework.Message      obj = (GameFramework.Message)o;
            GameFramework.IMessageBody ret = obj.body;
            ToLua.PushObject(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index body on a nil value"));
        }
    }
コード例 #4
0
    static int get_id(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GameFramework.Message obj = (GameFramework.Message)o;
            long ret = obj.id;
            LuaDLL.tolua_pushint64(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index id on a nil value"));
        }
    }
コード例 #5
0
    static int get_msgType(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            GameFramework.Message     obj = (GameFramework.Message)o;
            GameFramework.MessageType ret = obj.msgType;
            ToLua.Push(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index msgType on a nil value"));
        }
    }
    static int Recevive(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 2)
            {
                GameFramework.MessageModule obj  = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                GameFramework.Message       arg0 = StackTraits <GameFramework.Message> .Check(L, 2);

                obj.Recevive(arg0);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <int, GameFramework.IMessageBody>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                int arg0 = (int)LuaDLL.lua_tonumber(L, 2);
                GameFramework.IMessageBody arg1 = (GameFramework.IMessageBody)ToLua.ToObject(L, 3);
                obj.Recevive(arg0, arg1);
                return(0);
            }
            else if (count == 3 && TypeChecker.CheckTypes <GameFramework.MessageType, GameFramework.IMessageBody>(L, 2))
            {
                GameFramework.MessageModule obj  = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                GameFramework.MessageType   arg0 = (GameFramework.MessageType)ToLua.ToObject(L, 2);
                GameFramework.IMessageBody  arg1 = (GameFramework.IMessageBody)ToLua.ToObject(L, 3);
                obj.Recevive(arg0, arg1);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, GameFramework.MessageType, GameFramework.ByteBuffer>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                GameFramework.ByteBuffer  arg2 = (GameFramework.ByteBuffer)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, int, GameFramework.ByteBuffer>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                int    arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                GameFramework.ByteBuffer arg2 = (GameFramework.ByteBuffer)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <long, GameFramework.MessageType, UnityEngine.GameObject>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                long arg0 = LuaDLL.tolua_toint64(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                UnityEngine.GameObject    arg2 = (UnityEngine.GameObject)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <long, int, UnityEngine.GameObject>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                long arg0 = LuaDLL.tolua_toint64(L, 2);
                int  arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.GameObject arg2 = (UnityEngine.GameObject)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, GameFramework.MessageType, UnityEngine.GameObject>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                UnityEngine.GameObject    arg2 = (UnityEngine.GameObject)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, int, string>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                int    arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                string arg2 = ToLua.ToString(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <System.Type, GameFramework.MessageType, string>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                string arg2 = ToLua.ToString(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <System.Type, int, string>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                System.Type arg0 = (System.Type)ToLua.ToObject(L, 2);
                int         arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                string      arg2 = ToLua.ToString(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, GameFramework.MessageType, string>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                string arg2 = ToLua.ToString(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, int, UnityEngine.GameObject>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                int    arg1 = (int)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.GameObject arg2 = (UnityEngine.GameObject)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, GameFramework.MessageType, UnityEngine.Object>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string arg0 = ToLua.ToString(L, 2);
                GameFramework.MessageType arg1 = (GameFramework.MessageType)ToLua.ToObject(L, 3);
                UnityEngine.Object        arg2 = (UnityEngine.Object)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else if (count == 4 && TypeChecker.CheckTypes <string, int, UnityEngine.Object>(L, 2))
            {
                GameFramework.MessageModule obj = (GameFramework.MessageModule)ToLua.CheckObject <GameFramework.MessageModule>(L, 1);
                string             arg0         = ToLua.ToString(L, 2);
                int                arg1         = (int)LuaDLL.lua_tonumber(L, 3);
                UnityEngine.Object arg2         = (UnityEngine.Object)ToLua.ToObject(L, 4);
                obj.Recevive(arg0, arg1, arg2);
                return(0);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to method: GameFramework.MessageModule.Recevive"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }