Ejemplo n.º 1
0
    public static int AddLevel(IntPtr l)
    {
        int result;

        try
        {
            DataSectionHeroDungeon dataSectionHeroDungeon = (DataSectionHeroDungeon)LuaObject.checkSelf(l);
            HeroDungeonChapter     chapter;
            LuaObject.checkType <HeroDungeonChapter>(l, 2, out chapter);
            int levelId;
            LuaObject.checkType(l, 3, out levelId);
            int stars;
            LuaObject.checkType(l, 4, out stars);
            int nums;
            LuaObject.checkType(l, 5, out nums);
            dataSectionHeroDungeon.AddLevel(chapter, levelId, stars, nums);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }