static int get_ratio(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            NTGBattleUnitController.UnitBuff obj = (NTGBattleUnitController.UnitBuff)o;
            float ret = obj.ratio;
            LuaDLL.lua_pushnumber(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ratio on a nil value" : e.Message));
        }
    }
    static int get_desc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            NTGBattleUnitController.UnitBuff obj = (NTGBattleUnitController.UnitBuff)o;
            string ret = obj.desc;
            LuaDLL.lua_pushstring(L, ret);
            return(1);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index desc on a nil value" : e.Message));
        }
    }
    static int set_ratio(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            NTGBattleUnitController.UnitBuff obj = (NTGBattleUnitController.UnitBuff)o;
            float arg0 = (float)LuaDLL.luaL_checknumber(L, 2);
            obj.ratio = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index ratio on a nil value" : e.Message));
        }
    }
    static int set_desc(IntPtr L)
    {
        object o = null;

        try
        {
            o = ToLua.ToObject(L, 1);
            NTGBattleUnitController.UnitBuff obj = (NTGBattleUnitController.UnitBuff)o;
            string arg0 = ToLua.CheckString(L, 2);
            obj.desc = arg0;
            return(0);
        }
        catch (Exception e)
        {
            return(LuaDLL.toluaL_exception(L, e, o == null ? "attempt to index desc on a nil value" : e.Message));
        }
    }
Exemple #5
0
    public override void Respawn()
    {
        base.Respawn();

        sc = skillController as UTGBattlePassiveSkillControllerR60100080;

        transform.parent        = owner.transform;
        transform.localPosition = Vector3.zero;
        transform.localRotation = Quaternion.identity;

        unitBuff = new NTGBattleUnitController.UnitBuff {
            icon = skillController.icon, desc = NTGBattleDataController.GetSkillDesc(skillController.id), ratio = 0f
        };
        owner.unitBuffs.Add(unitBuff);

        FXEA();
        FXEB();
    }
    static int _CreateNTGBattleUnitController_UnitBuff(IntPtr L)
    {
        try
        {
            int count = LuaDLL.lua_gettop(L);

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