本文整理汇总了C#中OpenMetaverse.BitPack.PackColor方法的典型用法代码示例。如果您正苦于以下问题:C# BitPack.PackColor方法的具体用法?C# BitPack.PackColor怎么用?C# BitPack.PackColor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenMetaverse.BitPack
的用法示例。
在下文中一共展示了BitPack.PackColor方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetBytes
/// <summary>
/// Generate byte[] array from particle data
/// </summary>
/// <returns>Byte array</returns>
public byte[] GetBytes()
{
byte[] bytes = new byte[86];
BitPack pack = new BitPack(bytes, 0);
pack.PackBits(CRC, 32);
pack.PackBits((uint)PartFlags, 32);
pack.PackBits((uint)Pattern, 8);
pack.PackFixed(MaxAge, false, 8, 8);
pack.PackFixed(StartAge, false, 8, 8);
pack.PackFixed(InnerAngle, false, 3, 5);
pack.PackFixed(OuterAngle, false, 3, 5);
pack.PackFixed(BurstRate, false, 8, 8);
pack.PackFixed(BurstRadius, false, 8, 8);
pack.PackFixed(BurstSpeedMin, false, 8, 8);
pack.PackFixed(BurstSpeedMax, false, 8, 8);
pack.PackBits(BurstPartCount, 8);
pack.PackFixed(AngularVelocity.X, true, 8, 7);
pack.PackFixed(AngularVelocity.Y, true, 8, 7);
pack.PackFixed(AngularVelocity.Z, true, 8, 7);
pack.PackFixed(PartAcceleration.X, true, 8, 7);
pack.PackFixed(PartAcceleration.Y, true, 8, 7);
pack.PackFixed(PartAcceleration.Z, true, 8, 7);
pack.PackUUID(Texture);
pack.PackUUID(Target);
pack.PackBits((uint)PartDataFlags, 32);
pack.PackFixed(PartMaxAge, false, 8, 8);
pack.PackColor(PartStartColor);
pack.PackColor(PartEndColor);
pack.PackFixed(PartStartScaleX, false, 3, 5);
pack.PackFixed(PartStartScaleY, false, 3, 5);
pack.PackFixed(PartEndScaleX, false, 3, 5);
pack.PackFixed(PartEndScaleY, false, 3, 5);
return bytes;
}
示例2: PackLegacyData
void PackLegacyData(ref BitPack pack)
{
pack.PackBits((uint)PartDataFlags, 32);
pack.PackFixed(PartMaxAge, false, 8, 8);
pack.PackColor(PartStartColor);
pack.PackColor(PartEndColor);
pack.PackFixed(PartStartScaleX, false, 3, 5);
pack.PackFixed(PartStartScaleY, false, 3, 5);
pack.PackFixed(PartEndScaleX, false, 3, 5);
pack.PackFixed(PartEndScaleY, false, 3, 5);
}