Esempio n. 1
0
    public static int GetHeroAssignPoints(IntPtr l)
    {
        int result;

        try
        {
            int total = LuaDLL.lua_gettop(l);
            if (LuaObject.matchType(l, total, 2, typeof(Hero)))
            {
                HeroAssistantsTask heroAssistantsTask = (HeroAssistantsTask)LuaObject.checkSelf(l);
                Hero h;
                LuaObject.checkType <Hero>(l, 2, out h);
                int heroAssignPoints = heroAssistantsTask.GetHeroAssignPoints(h);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, heroAssignPoints);
                result = 2;
            }
            else if (LuaObject.matchType(l, total, 2, typeof(int)))
            {
                HeroAssistantsTask heroAssistantsTask2 = (HeroAssistantsTask)LuaObject.checkSelf(l);
                int heroId;
                LuaObject.checkType(l, 2, out heroId);
                int heroAssignPoints2 = heroAssistantsTask2.GetHeroAssignPoints(heroId);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, heroAssignPoints2);
                result = 2;
            }
            else if (LuaObject.matchType(l, total, 2, typeof(List <Hero>)))
            {
                HeroAssistantsTask heroAssistantsTask3 = (HeroAssistantsTask)LuaObject.checkSelf(l);
                List <Hero>        heroes;
                LuaObject.checkType <List <Hero> >(l, 2, out heroes);
                int heroAssignPoints3 = heroAssistantsTask3.GetHeroAssignPoints(heroes);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, heroAssignPoints3);
                result = 2;
            }
            else if (LuaObject.matchType(l, total, 2, typeof(List <int>)))
            {
                HeroAssistantsTask heroAssistantsTask4 = (HeroAssistantsTask)LuaObject.checkSelf(l);
                List <int>         heroIds;
                LuaObject.checkType <List <int> >(l, 2, out heroIds);
                int heroAssignPoints4 = heroAssistantsTask4.GetHeroAssignPoints(heroIds);
                LuaObject.pushValue(l, true);
                LuaObject.pushValue(l, heroAssignPoints4);
                result = 2;
            }
            else
            {
                LuaObject.pushValue(l, false);
                LuaDLL.lua_pushstring(l, "No matched override function GetHeroAssignPoints to call");
                result = 2;
            }
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 2
0
    public static int get_Config(IntPtr l)
    {
        int result;

        try
        {
            HeroAssistantsTask heroAssistantsTask = (HeroAssistantsTask)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, heroAssistantsTask.Config);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 3
0
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            HeroAssistantsTask o = new HeroAssistantsTask();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 4
0
    public static int set_ConfigDataLoader(IntPtr l)
    {
        int result;

        try
        {
            HeroAssistantsTask heroAssistantsTask = (HeroAssistantsTask)LuaObject.checkSelf(l);
            IConfigDataLoader  configDataLoader;
            LuaObject.checkType <IConfigDataLoader>(l, 2, out configDataLoader);
            heroAssistantsTask.ConfigDataLoader = configDataLoader;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
Esempio n. 5
0
    public static int set_WhichHeroAssistants(IntPtr l)
    {
        int result;

        try
        {
            HeroAssistantsTask heroAssistantsTask = (HeroAssistantsTask)LuaObject.checkSelf(l);
            HeroAssistants     whichHeroAssistants;
            LuaObject.checkType <HeroAssistants>(l, 2, out whichHeroAssistants);
            heroAssistantsTask.WhichHeroAssistants = whichHeroAssistants;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }