本文整理汇总了C#中Vector3.ShouldSpawnMotesAt方法的典型用法代码示例。如果您正苦于以下问题:C# Vector3.ShouldSpawnMotesAt方法的具体用法?C# Vector3.ShouldSpawnMotesAt怎么用?C# Vector3.ShouldSpawnMotesAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vector3
的用法示例。
在下文中一共展示了Vector3.ShouldSpawnMotesAt方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ThrowSmokeRed
public static void ThrowSmokeRed(Vector3 loc, float size)
{
if (!loc.ShouldSpawnMotesAt() || MoteCounter.SaturatedLowPriority)
{
return;
}
MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(ThingDef.Named("Mote_SmokeRed"), null);
moteThrown.ScaleUniform = Rand.Range(1.5f, 2.5f) * size;
moteThrown.exactRotationRate = Rand.Range(-0.5f, 0.5f);
moteThrown.exactPosition = loc;
moteThrown.SetVelocityAngleSpeed((float)Rand.Range(30, 40), Rand.Range(0.008f, 0.012f));
GenSpawn.Spawn(moteThrown, loc.ToIntVec3());
}
示例2: ThrowLightningGlowGreen
public static void ThrowLightningGlowGreen(Vector3 loc, float size)
{
if (!loc.ShouldSpawnMotesAt())
{
return;
}
MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(DefDatabase<ThingDef>.GetNamed("Mote_LightningGlowGreen", true), null);
moteThrown.ScaleUniform = 6f * size;
moteThrown.exactRotationRate = 0f;
moteThrown.exactPosition = loc;
moteThrown.exactPosition += new Vector3(0.5f, 0f, 0.5f);
//moteThrown.SetVelocityAngleSpeed((float)Rand.Range(0, 0), Rand.Range(0.0002f, 0.0002f));
GenSpawn.Spawn(moteThrown, loc.ToIntVec3());
}
示例3: ThrowMicroSparksRed
public static void ThrowMicroSparksRed(Vector3 loc)
{
if (!loc.ShouldSpawnMotesAt() || MoteCounter.Saturated)
{
return;
}
MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(ThingDef.Named("Mote_MicroSparksRed"), null);
moteThrown.ScaleUniform = Rand.Range(0.8f, 1.2f);
moteThrown.exactRotationRate = Rand.Range(-0.2f, 0.2f);
moteThrown.exactPosition = loc;
moteThrown.exactPosition -= new Vector3(0.5f, 0f, 0.5f);
moteThrown.exactPosition += new Vector3(Rand.Value, 0f, Rand.Value);
moteThrown.SetVelocityAngleSpeed((float)Rand.Range(35, 45), Rand.Range(0.02f, 0.02f));
GenSpawn.Spawn(moteThrown, loc.ToIntVec3());
}