本文整理汇总了C#中Primitive.SetExtraParamsFromBytes方法的典型用法代码示例。如果您正苦于以下问题:C# Primitive.SetExtraParamsFromBytes方法的具体用法?C# Primitive.SetExtraParamsFromBytes怎么用?C# Primitive.SetExtraParamsFromBytes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Primitive
的用法示例。
在下文中一共展示了Primitive.SetExtraParamsFromBytes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DecodeObjectCompressedData
//.........这里部分代码省略.........
"TextColor",
new Color4(block, i, false),
"Color4");
i += 4;
}
// Media URL
if ((flags & CompressedFlags.MediaURL) != 0)
{
string text = String.Empty;
while (block[i] != 0)
{
text += (char)block[i];
i++;
}
i++;
result.AppendFormat("{0,30}: {1,-40} [{2}]" + Environment.NewLine,
"MediaURL",
text,
"string");
}
// Particle system
if ((flags & CompressedFlags.HasParticles) != 0)
{
Primitive.ParticleSystem p = new Primitive.ParticleSystem(block, i);
result.AppendLine(DecodeObjectParticleSystem("ParticleSystem", p));
i += 86;
}
// Extra parameters TODO:
Primitive prim = new Primitive();
i += prim.SetExtraParamsFromBytes(block, i);
//Sound data
if ((flags & CompressedFlags.HasSound) != 0)
{
result.AppendFormat("{0,30}: {1,-40} [{2}]" + Environment.NewLine,
"SoundID",
new UUID(block, i),
"UUID");
i += 16;
result.AppendFormat("{0,30}: {1,-40} [{2}]" + Environment.NewLine,
"SoundGain",
Utils.BytesToFloat(block, i),
"Float");
i += 4;
result.AppendFormat("{0,30}: {1,-2} {2,-37} [{3}]" + Environment.NewLine,
"SoundFlags",
block[i++],
"(" + (SoundFlags)block[i] + ")",
"SoundFlags");
result.AppendFormat("{0,30}: {1,-40} [{2}]" + Environment.NewLine,
"SoundRadius",
Utils.BytesToFloat(block, i),
"Float");
i += 4;
}
// Name values
if ((flags & CompressedFlags.HasNameValues) != 0)
{