本文整理汇总了C#中ICustomDataInput.ReadFloat方法的典型用法代码示例。如果您正苦于以下问题:C# ICustomDataInput.ReadFloat方法的具体用法?C# ICustomDataInput.ReadFloat怎么用?C# ICustomDataInput.ReadFloat使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ICustomDataInput
的用法示例。
在下文中一共展示了ICustomDataInput.ReadFloat方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Deserialize
public virtual void Deserialize(ICustomDataInput reader)
{
var limit = reader.ReadUShort();
quantities = new uint[limit];
for (int i = 0; i < limit; i++)
{
(quantities as uint[])[i] = reader.ReadVarUhInt();
}
limit = reader.ReadUShort();
types = new uint[limit];
for (int i = 0; i < limit; i++)
{
(types as uint[])[i] = reader.ReadVarUhInt();
}
taxPercentage = reader.ReadFloat();
taxModificationPercentage = reader.ReadFloat();
maxItemLevel = reader.ReadByte();
if ((maxItemLevel < 0) || (maxItemLevel > 255))
throw new Exception("Forbidden value on maxItemLevel = " + maxItemLevel + ", it doesn't respect the following condition : (maxItemLevel < 0) || (maxItemLevel > 255)");
maxItemPerAccount = reader.ReadVarUhInt();
if (maxItemPerAccount < 0)
throw new Exception("Forbidden value on maxItemPerAccount = " + maxItemPerAccount + ", it doesn't respect the following condition : maxItemPerAccount < 0");
npcContextualId = reader.ReadInt();
unsoldDelay = reader.ReadVarUhShort();
if (unsoldDelay < 0)
throw new Exception("Forbidden value on unsoldDelay = " + unsoldDelay + ", it doesn't respect the following condition : unsoldDelay < 0");
}
示例2: Deserialize
public virtual void Deserialize(ICustomDataInput reader)
{
objectUID = reader.ReadVarUhInt();
if (objectUID < 0)
throw new Exception("Forbidden value on objectUID = " + objectUID + ", it doesn't respect the following condition : objectUID < 0");
bonusMin = reader.ReadFloat();
bonusMax = reader.ReadFloat();
var limit = reader.ReadUShort();
runesId = new ushort[limit];
for (int i = 0; i < limit; i++)
{
(runesId as ushort[])[i] = reader.ReadVarUhShort();
}
limit = reader.ReadUShort();
runesQty = new uint[limit];
for (int i = 0; i < limit; i++)
{
(runesQty as uint[])[i] = reader.ReadVarUhInt();
}
}