Пример #1
0
    public void Deserialize(DynamicPacket packet)
    {
        int num = (int)packet.PackReadInt32();

        for (int i = 0; i < num; i++)
        {
            Test2Cfg item = new Test2Cfg();
            item.Deserialize(packet);
            mList.Add(item);
        }
    }
Пример #2
0
    public Dictionary <string, string> Map8; //		stringstring字典

    public void Deserialize(DynamicPacket packet)
    {
        ID     = packet.PackReadInt32();
        HP     = packet.PackReadFloat();
        HasUse = packet.PackReadBoolean();
        Name1  = packet.PackReadString();
        Name2  = packet.PackReadString();
        Vec1   = SheetGenCommonFunc.GetListInt(packet.PackReadString());
        Vec2   = SheetGenCommonFunc.GetListFloat(packet.PackReadString());
        Vec4   = SheetGenCommonFunc.GetListString(packet.PackReadString());
        Map1   = SheetGenCommonFunc.GetDictIntInt(packet.PackReadString());
        Map2   = SheetGenCommonFunc.GetDictIntFloat(packet.PackReadString());
        Map4   = SheetGenCommonFunc.GetDictIntString(packet.PackReadString());
        Map5   = SheetGenCommonFunc.GetDictStringInt(packet.PackReadString());
        Map6   = SheetGenCommonFunc.GetDictStringFloat(packet.PackReadString());
        Map8   = SheetGenCommonFunc.GetDictStringString(packet.PackReadString());
    }
Пример #3
0
    public void Deserialize(DynamicPacket packet)
    {
        int num = (int)packet.PackReadInt32();

        for (int i = 0; i < num; i++)
        {
            Test1Cfg item = new Test1Cfg();
            item.Deserialize(packet);
            if (mDict.ContainsKey(item.ID))
            {
                mDict[item.ID] = item;
            }
            else
            {
                mDict.Add(item.ID, item);
            }
        }
    }