本文整理汇总了C#中D3Sharp.Net.Game.Messages.GameBitBuffer类的典型用法代码示例。如果您正苦于以下问题:C# GameBitBuffer类的具体用法?C# GameBitBuffer怎么用?C# GameBitBuffer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GameBitBuffer类属于D3Sharp.Net.Game.Messages命名空间,在下文中一共展示了GameBitBuffer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Encode
public void Encode(GameBitBuffer buffer)
{
for (int i = 0; i < Field0.Length; i++)
{
Field0[i].Encode(buffer);
}
}
示例2: Encode
public override void Encode(GameBitBuffer buffer)
{
buffer.WriteInt(32, Field0);
buffer.WriteInt(4, atKeyVals.Length);
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].Encode(buffer); }
for (int i = 0; i < atKeyVals.Length; i++) { atKeyVals[i].EncodeValue(buffer); }
}
示例3: Encode
public override void Encode(GameBitBuffer buffer)
{
buffer.WriteInt(3, Field0);
buffer.WriteInt(5, Field1);
buffer.WriteInt(32, Field2);
buffer.WriteInt(5, Field3 - (-1));
}
示例4: Encode
public override void Encode(GameBitBuffer buffer)
{
buffer.WriteInt(32, Field0);
buffer.WriteInt(11, Field1 - (-1));
buffer.WriteInt(11, Field2);
buffer.WriteBool(Field3);
}
示例5: Parse
public override void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
Field1 = new InventoryLocationMessageData();
Field1.Parse(buffer);
Field2 = buffer.ReadInt(32);
}
示例6: Parse
public void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
Field1 = buffer.ReadInt(32);
Field2 = buffer.ReadInt(32);
Field3 = buffer.ReadFloat32();
}
示例7: Parse
public override void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(2);
Field1 = buffer.ReadBool();
Field2 = buffer.ReadInt(32);
Field3 = buffer.ReadInt(7);
}
示例8: Encode
public override void Encode(GameBitBuffer buffer)
{
buffer.WriteInt(32, Field0);
buffer.WriteCharArray(128, Field1);
buffer.WriteCharArray(49, Field2);
buffer.WriteInt(4, Field3 - (2));
}
示例9: Parse
public void Parse(GameBitBuffer buffer)
{
Field0 = (byte) buffer.ReadInt(8);
Field1 = (byte) buffer.ReadInt(8);
Field2 = (byte) buffer.ReadInt(8);
Field3 = (byte) buffer.ReadInt(8);
}
示例10: Encode
public override void Encode(GameBitBuffer buffer)
{
buffer.WriteInt(32, Field0);
buffer.WriteInt(2, Field1);
buffer.WriteInt(6, aAffixGBIDs.Length);
for (int i = 0; i < aAffixGBIDs.Length; i++) buffer.WriteInt(32, aAffixGBIDs[i]);
}
示例11: Parse
public override void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
Field1 = buffer.ReadCharArray(128);
Field2 = buffer.ReadCharArray(49);
Field3 = buffer.ReadInt(4) + (2);
}
示例12: Parse
public override void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
Field1 = buffer.ReadInt(2);
aAffixGBIDs = new int /* gbid */[buffer.ReadInt(6)];
for (int i = 0; i < aAffixGBIDs.Length; i++) aAffixGBIDs[i] = buffer.ReadInt(32);
}
示例13: Parse
public void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
Field1 = new IVector2D();
Field1.Parse(buffer);
arSnoLevelAreas = new int /* sno */[4];
for (int i = 0; i < arSnoLevelAreas.Length; i++) arSnoLevelAreas[i] = buffer.ReadInt(32);
snoPrevWorld = buffer.ReadInt(32);
Field4 = buffer.ReadInt(32);
snoPrevLevelArea = buffer.ReadInt(32);
snoNextWorld = buffer.ReadInt(32);
Field7 = buffer.ReadInt(32);
snoNextLevelArea = buffer.ReadInt(32);
snoMusic = buffer.ReadInt(32);
snoCombatMusic = buffer.ReadInt(32);
snoAmbient = buffer.ReadInt(32);
snoReverb = buffer.ReadInt(32);
snoWeather = buffer.ReadInt(32);
snoPresetWorld = buffer.ReadInt(32);
Field15 = buffer.ReadInt(32);
Field16 = buffer.ReadInt(32);
Field17 = buffer.ReadInt(32);
Field18 = buffer.ReadInt(32);
tCachedValues = new SceneCachedValues();
tCachedValues.Parse(buffer);
}
示例14: Parse
public override void Parse(GameBitBuffer buffer)
{
Field0 = buffer.ReadInt(32);
if (buffer.ReadBool())
{
Field1 = new Vector3D();
Field1.Parse(buffer);
}
if (buffer.ReadBool())
{
Field2 = buffer.ReadFloat32();
}
if (buffer.ReadBool())
{
Field3 = buffer.ReadBool();
}
if (buffer.ReadBool())
{
Field4 = buffer.ReadFloat32();
}
if (buffer.ReadBool())
{
Field5 = buffer.ReadInt(24);
}
if (buffer.ReadBool())
{
Field6 = buffer.ReadInt(21) + (-1);
}
if (buffer.ReadBool())
{
Field7 = buffer.ReadInt(32);
}
}
示例15: EncodeValue
public void EncodeValue(GameBitBuffer buffer)
{
switch (Attribute.EncodingType)
{
case GameAttributeEncoding.Int:
buffer.WriteInt(Attribute.BitCount, Int);
break;
case GameAttributeEncoding.IntMinMax:
buffer.WriteInt(Attribute.BitCount, Int - Attribute.Min);
break;
case GameAttributeEncoding.Float16:
buffer.WriteFloat16(Float);
break;
case GameAttributeEncoding.Float16Or32:
if (Float >= 65536.0f || -65536.0f >= Float)
{
buffer.WriteBool(false);
buffer.WriteFloat32(Float);
}
else
{
buffer.WriteBool(true);
buffer.WriteFloat16(Float);
}
break;
default:
throw new Exception("bad voodoo");
}
}