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

        if (count == 2)
        {
            uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 1);
            BadgeSlotBaseConfig arg1 = (BadgeSlotBaseConfig)LuaScriptMgr.GetNetObject(L, 2, typeof(BadgeSlotBaseConfig));
            KeyValuePair <uint, BadgeSlotBaseConfig> obj = new KeyValuePair <uint, BadgeSlotBaseConfig>(arg0, arg1);
            LuaScriptMgr.PushValue(L, obj);
            return(1);
        }
        else if (count == 0)
        {
            KeyValuePair <uint, BadgeSlotBaseConfig> obj = new KeyValuePair <uint, BadgeSlotBaseConfig>();
            LuaScriptMgr.PushValue(L, obj);
            return(1);
        }
        else
        {
            LuaDLL.luaL_error(L, "invalid arguments to method: KeyValuePair<uint,BadgeSlotBaseConfig>.New");
        }

        return(0);
    }
Пример #2
0
    //通过槽位ID获取本地配置的相关信息
    public BadgeSlotBaseConfig GetConfig(uint slotId)
    {
        BadgeSlotBaseConfig data = null;

        configs.TryGetValue(slotId, out data);
        return(data);
    }
Пример #3
0
    static int ContainsValue(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Dictionary <uint, BadgeSlotBaseConfig> obj = (Dictionary <uint, BadgeSlotBaseConfig>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,BadgeSlotBaseConfig>");
        BadgeSlotBaseConfig arg0 = (BadgeSlotBaseConfig)LuaScriptMgr.GetNetObject(L, 2, typeof(BadgeSlotBaseConfig));
        bool o = obj.ContainsValue(arg0);

        LuaScriptMgr.Push(L, o);
        return(1);
    }
Пример #4
0
    static int Add(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        Dictionary <uint, BadgeSlotBaseConfig> obj = (Dictionary <uint, BadgeSlotBaseConfig>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,BadgeSlotBaseConfig>");
        uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        BadgeSlotBaseConfig arg1 = (BadgeSlotBaseConfig)LuaScriptMgr.GetNetObject(L, 3, typeof(BadgeSlotBaseConfig));

        obj.Add(arg0, arg1);
        return(0);
    }
Пример #5
0
    static int get_Item(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        Dictionary <uint, BadgeSlotBaseConfig> obj = (Dictionary <uint, BadgeSlotBaseConfig>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,BadgeSlotBaseConfig>");
        uint arg0             = (uint)LuaScriptMgr.GetNumber(L, 2);
        BadgeSlotBaseConfig o = obj[arg0];

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
    static int GetConfig(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 2);
        BadgeSlotConfig     obj  = (BadgeSlotConfig)LuaScriptMgr.GetNetObjectSelf(L, 1, "BadgeSlotConfig");
        uint                arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        BadgeSlotBaseConfig o    = obj.GetConfig(arg0);

        LuaScriptMgr.PushObject(L, o);
        return(1);
    }
Пример #7
0
    static int TryGetValue(IntPtr L)
    {
        LuaScriptMgr.CheckArgsCount(L, 3);
        Dictionary <uint, BadgeSlotBaseConfig> obj = (Dictionary <uint, BadgeSlotBaseConfig>)LuaScriptMgr.GetNetObjectSelf(L, 1, "Dictionary<uint,BadgeSlotBaseConfig>");
        uint arg0 = (uint)LuaScriptMgr.GetNumber(L, 2);
        BadgeSlotBaseConfig arg1 = null;
        bool o = obj.TryGetValue(arg0, out arg1);

        LuaScriptMgr.Push(L, o);
        LuaScriptMgr.PushObject(L, arg1);
        return(2);
    }
Пример #8
0
    static int _CreateBadgeSlotBaseConfig(IntPtr L)
    {
        int count = LuaDLL.lua_gettop(L);

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

        return(0);
    }
Пример #9
0
    //读取解析配置
    public void ReadConfig()
    {
        if (isLoadFinish == false)
        {
            return;
        }
        isLoadFinish = false;
        lock (LockObject) { GameSystem.Instance.readConfigCnt += 1; }
        Debug.Log("Config reading " + name);
        string text = ResourceLoadManager.Instance.GetConfigText(name);

        if (text == null)
        {
            Debug.LogError("LoadConfig failed: " + name);
            return;
        }

        XmlDocument doc       = CommonFunction.LoadXmlConfig(name, text);
        XmlNode     node_data = doc.SelectSingleNode("Data");

        foreach (XmlNode node_line in node_data.SelectNodes("Line"))
        {
            if (node_line.SelectSingleNode("switch").InnerText == "#")
            {
                continue;
            }

            BadgeSlotBaseConfig data = new BadgeSlotBaseConfig();
            data.id                 = uint.Parse(node_line.SelectSingleNode("id").InnerText);
            data.name               = node_line.SelectSingleNode("name").InnerText;
            data.category           = (BadgeCG)uint.Parse(node_line.SelectSingleNode("category").InnerText);
            data.requireLevel       = uint.Parse(node_line.SelectSingleNode("requireLevel").InnerText);
            data.layoutPosx         = float.Parse(node_line.SelectSingleNode("layoutPosX").InnerText);
            data.layoutPosy         = float.Parse(node_line.SelectSingleNode("layoutPosY").InnerText);
            data.unlockCostGoodsId  = uint.Parse(node_line.SelectSingleNode("unlockCostGoodsID").InnerText);
            data.unlockCostGoodsNum = uint.Parse(node_line.SelectSingleNode("unlockCostGoodsNum").InnerText);
            configs.Add(data.id, data);
        }
    }
Пример #10
0
    static int get_name(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);
        BadgeSlotBaseConfig obj = (BadgeSlotBaseConfig)o;

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

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

        LuaScriptMgr.Push(L, obj.name);
        return(1);
    }
Пример #11
0
    static int set_unlockCostGoodsNum(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);
        BadgeSlotBaseConfig obj = (BadgeSlotBaseConfig)o;

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

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

        obj.unlockCostGoodsNum = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Пример #12
0
    static int set_layoutPosy(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);
        BadgeSlotBaseConfig obj = (BadgeSlotBaseConfig)o;

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

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

        obj.layoutPosy = (float)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Пример #13
0
    static int set_requireLevel(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);
        BadgeSlotBaseConfig obj = (BadgeSlotBaseConfig)o;

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

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

        obj.requireLevel = (uint)LuaScriptMgr.GetNumber(L, 3);
        return(0);
    }
Пример #14
0
    static int set_category(IntPtr L)
    {
        object o = LuaScriptMgr.GetLuaObject(L, 1);
        BadgeSlotBaseConfig obj = (BadgeSlotBaseConfig)o;

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

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

        obj.category = (fogs.proto.msg.BadgeCG)LuaScriptMgr.GetNetObject(L, 3, typeof(fogs.proto.msg.BadgeCG));
        return(0);
    }