public static int Dispose(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            arenaDefendBattle.Dispose();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_m_fxPool(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, arenaDefendBattle.m_luaExportHelper.m_fxPool);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int constructor(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle o = new ArenaDefendBattle();
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int ClearMapTerrainFx(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            arenaDefendBattle.m_luaExportHelper.ClearMapTerrainFx();
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int get_FxPlayer(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, arenaDefendBattle.FxPlayer);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int DestroyGraphic(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            GenericGraphic    graphic;
            LuaObject.checkType <GenericGraphic>(l, 2, out graphic);
            arenaDefendBattle.DestroyGraphic(graphic);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_mapTerrainFxRoot(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            GameObject        mapTerrainFxRoot;
            LuaObject.checkType <GameObject>(l, 2, out mapTerrainFxRoot);
            arenaDefendBattle.m_luaExportHelper.m_mapTerrainFxRoot = mapTerrainFxRoot;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int Update(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            float             dt;
            LuaObject.checkType(l, 2, out dt);
            arenaDefendBattle.Update(dt);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_fxPlayer(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            FxPlayer          fxPlayer;
            LuaObject.checkType <FxPlayer>(l, 2, out fxPlayer);
            arenaDefendBattle.m_luaExportHelper.m_fxPlayer = fxPlayer;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int CreateMap(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle         arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            ConfigDataArenaBattleInfo battleInfo;
            LuaObject.checkType <ConfigDataArenaBattleInfo>(l, 2, out battleInfo);
            arenaDefendBattle.CreateMap(battleInfo);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_graphicPool(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            GraphicPool       graphicPool;
            LuaObject.checkType <GraphicPool>(l, 2, out graphicPool);
            arenaDefendBattle.m_luaExportHelper.m_graphicPool = graphicPool;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_arenaBattleInfo(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle         arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            ConfigDataArenaBattleInfo arenaBattleInfo;
            LuaObject.checkType <ConfigDataArenaBattleInfo>(l, 2, out arenaBattleInfo);
            arenaDefendBattle.m_luaExportHelper.m_arenaBattleInfo = arenaBattleInfo;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_camera(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            BattleCamera      camera;
            LuaObject.checkType <BattleCamera>(l, 2, out camera);
            arenaDefendBattle.m_luaExportHelper.m_camera = camera;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int Initialize(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            GameObject        root;
            LuaObject.checkType <GameObject>(l, 2, out root);
            arenaDefendBattle.Initialize(root);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int set_m_mapTerrainFxs(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            Dictionary <GridPosition, GameObject> mapTerrainFxs;
            LuaObject.checkType <Dictionary <GridPosition, GameObject> >(l, 2, out mapTerrainFxs);
            arenaDefendBattle.m_luaExportHelper.m_mapTerrainFxs = mapTerrainFxs;
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int GridPositionToWorldPosition(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            GridPosition      p;
            LuaObject.checkValueType <GridPosition>(l, 2, out p);
            Vector2 o = arenaDefendBattle.GridPositionToWorldPosition(p);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int ScreenPositionToGridPosition(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            Vector2           p;
            LuaObject.checkType(l, 2, out p);
            GridPosition gridPosition = arenaDefendBattle.ScreenPositionToGridPosition(p);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, gridPosition);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int CreateMapTerrainFx(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle         arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            ConfigDataBattlefieldInfo battlefieldInfo;
            LuaObject.checkType <ConfigDataBattlefieldInfo>(l, 2, out battlefieldInfo);
            GameObject parent;
            LuaObject.checkType <GameObject>(l, 3, out parent);
            arenaDefendBattle.m_luaExportHelper.CreateMapTerrainFx(battlefieldInfo, parent);
            LuaObject.pushValue(l, true);
            result = 1;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }
    public static int CreateGraphic(IntPtr l)
    {
        int result;

        try
        {
            ArenaDefendBattle arenaDefendBattle = (ArenaDefendBattle)LuaObject.checkSelf(l);
            string            assetName;
            LuaObject.checkType(l, 2, out assetName);
            float scale;
            LuaObject.checkType(l, 3, out scale);
            GenericGraphic o = arenaDefendBattle.CreateGraphic(assetName, scale);
            LuaObject.pushValue(l, true);
            LuaObject.pushValue(l, o);
            result = 2;
        }
        catch (Exception e)
        {
            result = LuaObject.error(l, e);
        }
        return(result);
    }