Example #1
0
 static int GetMapData(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 2);
         ConfigManager          obj  = (ConfigManager)ToLua.CheckObject <ConfigManager>(L, 1);
         uint                   arg0 = (uint)LuaDLL.luaL_checknumber(L, 2);
         FirClient.Data.MapData o    = obj.GetMapData(arg0);
         ToLua.PushObject(L, o);
         return(1);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
    static int get_eventid(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            uint ret = obj.eventid;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index eventid on a nil value"));
        }
    }
    static int set_events(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            System.Collections.Generic.List <FirClient.Data.SceneEvent> arg0 = (System.Collections.Generic.List <FirClient.Data.SceneEvent>)ToLua.CheckObject(L, 2, typeof(System.Collections.Generic.List <FirClient.Data.SceneEvent>));
            obj.events = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index events on a nil value"));
        }
    }
    static int set_sound(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.sound = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index sound on a nil value"));
        }
    }
    static int set_eventid(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            uint arg0 = (uint)LuaDLL.luaL_checknumber(L, 2);
            obj.eventid = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index eventid on a nil value"));
        }
    }
    static int get_events(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            System.Collections.Generic.List <FirClient.Data.SceneEvent> ret = obj.events;
            ToLua.PushSealed(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index events on a nil value"));
        }
    }
    static int get_sound(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            FirClient.Data.MapData obj = (FirClient.Data.MapData)o;
            string ret = obj.sound;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o, "attempt to index sound on a nil value"));
        }
    }
    static int _CreateFirClient_Data_MapData(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

            if (count == 0)
            {
                FirClient.Data.MapData obj = new FirClient.Data.MapData();
                ToLua.PushObject(L, obj);
                return(1);
            }
            else
            {
                return(LuaDLL.luaL_throw(L, "invalid arguments to ctor method: FirClient.Data.MapData.New"));
            }
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e));
        }
    }