本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例8: ReadInt
private int ReadInt(ByteArray ba)
{
return ba.ReadInt();
}
示例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;
}
示例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;
}
示例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;
}