本文整理匯總了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);
}