当前位置: 首页>>代码示例>>C#>>正文


C# ByteArray.ReadInt方法代码示例

本文整理汇总了C#中ByteArray.ReadInt方法的典型用法代码示例。如果您正苦于以下问题:C# ByteArray.ReadInt方法的具体用法?C# ByteArray.ReadInt怎么用?C# ByteArray.ReadInt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ByteArray的用法示例。


在下文中一共展示了ByteArray.ReadInt方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         HumanTemplateVO vo = new HumanTemplateVO();
         vo.id = data.ReadInt();
         vo.exp = data.ReadInt();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:14,代码来源:HumanTemplateVODataReader.cs

示例2: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         BuildingProductTemplateVO vo = new BuildingProductTemplateVO();
         vo.id = data.ReadInt();
         vo.goldSpeed = data.ReadInt();
         vo.rarityCurrencySpeed = data.ReadInt();
         vo.campTimeCoef = data.ReadInt();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:16,代码来源:BuildingProductTemplateVODataReader.cs

示例3: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         LanguageVO vo = new LanguageVO();
         vo.Value = data.ReadUTF();
         vo.key = data.ReadUTF();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:14,代码来源:LocalizationTemplateVODataReader.cs

示例4: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         BuildingLevelTemplateVO vo = new BuildingLevelTemplateVO();
         vo.id = data.ReadInt();
         vo.time = data.ReadInt();
         vo.gold = data.ReadInt();
         vo.wood = data.ReadInt();
         vo.stone = data.ReadInt();
         vo.crystal = data.ReadInt();
         vo.sulfur = data.ReadInt();
         vo.diamond = data.ReadInt();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:20,代码来源:BuildingLevelTemplateVODataReader.cs

示例5: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         BuildingTemplateVO vo = new BuildingTemplateVO();
         vo.id = data.ReadInt();
         vo.name = data.ReadUTF();
         vo.type = data.ReadInt();
         vo.buildingIndex = data.ReadInt();
         vo.camp = data.ReadInt();
         vo.image = data.ReadUTF();
         vo.levelMap = data.ReadInt();
         vo.affiliation = data.ReadInt();
         vo.openNeedThLevel = data.ReadInt();
         vo.isInitZore = data.ReadInt();
         vo.levelRule = data.ReadInt();
         vo.gold = data.ReadInt();
         vo.wood = data.ReadInt();
         vo.crystal = data.ReadInt();
         vo.stone = data.ReadInt();
         vo.sulfur = data.ReadInt();
         vo.diamond = data.ReadInt();
         vo.upgradeCdTime = data.ReadInt();
         vo.productActorId = data.ReadInt();
         vo.makeCurrencyId = data.ReadInt();
         vo.desc = data.ReadUTF();
         vo.isOpen = data.ReadInt();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:34,代码来源:BuildingTemplateVODataReader.cs

示例6: ReadStringList

    private List<string> ReadStringList(ByteArray ba)
    {
        List<string> tbl = HeapObjectPoolTool<List<string>>.GetHeapObject();

        int len1 = ba.ReadShort();
        ba.ReadInt();

        for (int i = 0; i < len1; i++)
        {
            tbl.Add(ReadString(ba));
        }
        return tbl;
    }
开发者ID:GaoKaiHaHa,项目名称:MyUnityFrameWork,代码行数:13,代码来源:ProtocolService.cs

示例7: ReadIntList

    private List<int> ReadIntList(ByteArray ba)
    {
        List<int> tbl = HeapObjectPoolTool<List<int>>.GetHeapObject();

        int len1 = ba.ReadShort();
        ba.ReadInt();

        for (int i = 0; i < len1; i++)
        {
            int tem_o_read_int = ReadInt(ba);
            tbl.Add(tem_o_read_int);
        }

        return tbl;
    }
开发者ID:GaoKaiHaHa,项目名称:MyUnityFrameWork,代码行数:15,代码来源:ProtocolService.cs

示例8: ReadInt

 private int ReadInt(ByteArray ba)
 {
     return ba.ReadInt();
 }
开发者ID:GaoKaiHaHa,项目名称:MyUnityFrameWork,代码行数:4,代码来源:ProtocolService.cs

示例9: ReadDictionaryList

    private List<Dictionary<string, object>> ReadDictionaryList(string str, ByteArray ba)
    {
        List<Dictionary<string, object>> stbl = HeapObjectPoolTool<List<Dictionary<string, object>>>.GetHeapObject();
        int len1 = ba.ReadShort();
        ba.ReadInt();

        for (int i = 0; i < len1; i++)
        {
            stbl.Add(ReadDictionary(str, ba));
        }
        return stbl;
    }
开发者ID:GaoKaiHaHa,项目名称:MyUnityFrameWork,代码行数:12,代码来源:ProtocolService.cs

示例10: ReadDictionary

    private Dictionary<string, object> ReadDictionary(string dictName, ByteArray ba)
    {
        int st_len = ba.ReadInt();

        Dictionary<string, object> tbl = HeapObjectPool.GetSODict();

        if (st_len == 0)
        {
            return tbl;
        }

        List<Dictionary<string, object>> tableInfo = m_protocolInfo[dictName];

        for (int i = 0; i < tableInfo.Count; i++)
        {
            int vts = (int)tableInfo[i]["type"];
            int spl = (int)tableInfo[i]["spl"];
            if (vts == TYPE_string)
            {
                if (spl == RT_repeated)
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadStringList(ba);
                }
                else
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadString(ba);
                }
            }
            else if (vts == TYPE_bool)
            {
                if (spl == RT_repeated)
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadBoolList(ba);
                }
                else
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadBool(ba);
                }
            }
            else if (vts == TYPE_double)
            {
                if (spl == RT_repeated)
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadDoubleList(ba);
                }
                else
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadDouble(ba);
                }
            }
            else if (vts == TYPE_int32)
            {

                if (spl == RT_repeated)
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadIntList(ba);
                }
                else
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadInt(ba);
                }
            }
            else
            {
                if (spl == RT_repeated)
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadDictionaryList((string)tableInfo[i]["vp"], ba);
                }
                else
                {
                    tbl[(string)tableInfo[i]["name"]] = ReadDictionary((string)tableInfo[i]["vp"], ba);
                }
            }
        }
        return tbl;
    }
开发者ID:GaoKaiHaHa,项目名称:MyUnityFrameWork,代码行数:76,代码来源:ProtocolService.cs

示例11: GenerateByteArray

 public System.Collections.Generic.List<object> GenerateByteArray(byte[] bytes)
 {
     ByteArray data = new ByteArray(bytes);
     System.Collections.Generic.List<object> list = new System.Collections.Generic.List<object>();
     int length = data.ReadInt();
     for (int i = 0; (i < length); i = (i + 1))
     {
         BuildingSettingTemplateVO vo = new BuildingSettingTemplateVO();
         vo.id = data.ReadInt();
         vo.fuxingSquirePopu = data.ReadInt();
         vo.beastiaryPopu = data.ReadInt();
         vo.herohouseNumber = data.ReadInt();
         vo.mineNeedminer = data.ReadInt();
         vo.minerMax = data.ReadInt();
         vo.currencyMax = data.ReadInt();
         vo.currencyProtectRate = data.ReadInt();
         vo.currencyProtectVal = data.ReadInt();
         vo.def = data.ReadInt();
         vo.myOrderNumber = data.ReadInt();
         list.Add(vo);
     }
     return list;
 }
开发者ID:wsycarlos,项目名称:ARIA,代码行数:23,代码来源:BuildingSettingTemplateVODataReader.cs


注:本文中的ByteArray.ReadInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。