当前位置: 首页>>代码示例>>C#>>正文


C# Vector3.ShouldSpawnMotesAt方法代码示例

本文整理汇总了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());
 }
开发者ID:Skullywag,项目名称:LaserWeapons,代码行数:13,代码来源:Projectile_FusionGrenade.cs

示例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());
 }
开发者ID:Skullywag,项目名称:DermalRegenerator,代码行数:14,代码来源:Building_DermalRegeneratorNew.cs

示例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());
 }
开发者ID:Skullywag,项目名称:LaserWeapons,代码行数:15,代码来源:Projectile_FusionGrenade.cs


注:本文中的Vector3.ShouldSpawnMotesAt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。