static int CreateInstance(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 1)
        {
            string arg0 = LuaScriptMgr.GetLuaString(L, 1);
            Games.Module.Props.Prop o = Games.Module.Props.Prop.CreateInstance(arg0);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(Games.Module.Props.PropConfig), typeof(float)))
        {
            Games.Module.Props.PropConfig arg0 = (Games.Module.Props.PropConfig)LuaScriptMgr.GetLuaObject(L, 1);
            float arg1 = (float)LuaDLL.lua_tonumber(L, 2);
            Games.Module.Props.Prop o = Games.Module.Props.Prop.CreateInstance(arg0, arg1);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else if (count == 2 && LuaScriptMgr.CheckTypes(L, 1, typeof(int), typeof(float)))
        {
            int   arg0 = (int)LuaDLL.lua_tonumber(L, 1);
            float arg1 = (float)LuaDLL.lua_tonumber(L, 2);
            Games.Module.Props.Prop o = Games.Module.Props.Prop.CreateInstance(arg0, arg1);
            LuaScriptMgr.PushObject(L, o);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: Games.Module.Props.Prop.CreateInstance");
        }

        return(0);
    }
 static int Clone(IntPtr L)
 {
     LuaScriptMgr.CheckArgsCount(L, 1);
     Games.Module.Props.Prop obj = (Games.Module.Props.Prop)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Props.Prop");
     Games.Module.Props.Prop o   = obj.Clone();
     LuaScriptMgr.PushObject(L, o);
     return(1);
 }
    static int ToString(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 1);
        Games.Module.Props.Prop obj = (Games.Module.Props.Prop)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Props.Prop");
        string o = obj.ToString();

        LuaScriptMgr.Push(L, o);
        return(1);
    }
    static int ParseField(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Games.Module.Props.Prop obj = (Games.Module.Props.Prop)LuaScriptMgr.GetNetObjectSelf(L, 1, "Games.Module.Props.Prop");
        string arg0 = LuaScriptMgr.GetLuaString(L, 2);

        obj.ParseField(arg0);
        return(0);
    }
    static int Lua_Mul(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Games.Module.Props.Prop arg0 = (Games.Module.Props.Prop)LuaScriptMgr.GetNetObject(L, 1, typeof(Games.Module.Props.Prop));
        float arg1 = (float)LuaScriptMgr.GetNumber(L, 2);

        Games.Module.Props.Prop o = arg0 * arg1;
        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int _CreateGames_Module_Props_Prop(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

        if (count == 0)
        {
            Games.Module.Props.Prop obj = new Games.Module.Props.Prop();
            LuaScriptMgr.PushObject(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: Games.Module.Props.Prop.New");
        }

        return(0);
    }
    static int get_value(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Props.Prop obj = (Games.Module.Props.Prop)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name value");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index value on a nil value");
            }
        }

        LuaScriptMgr.Push(L, obj.value);
        return(1);
    }
    static int set_ID(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Props.Prop obj = (Games.Module.Props.Prop)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name ID");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index ID on a nil value");
            }
        }

        obj.ID = (int)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
    static int set_config(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);

        Games.Module.Props.Prop obj = (Games.Module.Props.Prop)o;

        if (obj == null)
        {
            LuaTypes types = LuaDLL.lua_type(L, 1);

            if (types == LuaTypes.LUA_TTABLE)
            {
                LuaDLL.luaL_error(L, "unknown member name config");
            }
            else
            {
                LuaDLL.luaL_error(L, "attempt to index config on a nil value");
            }
        }

        obj.config = (Games.Module.Props.PropConfig)LuaScriptMgr.GetNetObject(L, 3, typeof(Games.Module.Props.PropConfig));
        return(0);
    }
Ejemplo n.º 10
0
 public void Minus(Prop prop)
 {
     _rawValues[prop.id] -= prop.value;
     _invalidateProps     = true;
 }
Ejemplo n.º 11
0
 public void Plus(Prop prop)
 {
     _rawValues[prop.id] += prop.value;
     _invalidateProps     = true;
 }
Ejemplo n.º 12
0
        public Prop GetProp(params object[] args)
        {
            float value = Formula.CallFloal(formula, args);

            return(Prop.CreateInstance(id, value));
        }
Ejemplo n.º 13
0
 public void Remove(Prop propValue)
 {
     Remove(propValue, true);
 }
Ejemplo n.º 14
0
 public void Add(Prop propValue)
 {
     Add(propValue, true);
 }