Ejemplo n.º 1
0
        public static void ThrowSmoke(Vector3 loc, float size, string moteDefName)
        {
            if (!loc.ShouldSpawnMotesAt()) return;

            var moteThrown = (MoteThrown)ThingMaker.MakeThing(ThingDefOf.Mote_Smoke);
            moteThrown.Scale = Rand.Range(1.5f, 2.5f) * size;
            moteThrown.rotationRate = Rand.Range(-30f, 30f);
            moteThrown.exactPosition = loc;
            moteThrown.SetVelocity(Rand.Range(30, 40), Rand.Range(0.5f, 0.7f));
            GenSpawn.Spawn(moteThrown, loc.ToIntVec3());
        }
 public static void ThrowSmokeBlue(Vector3 loc, float size)
 {
     if (!loc.ShouldSpawnMotesAt() || MoteCounter.SaturatedLowPriority)
     {
         return;
     }
     MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(ThingDef.Named("Mote_SmokeBlue"), 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());
 }
 public static void ThrowMicroSparksBlue(Vector3 loc)
 {
     if (!loc.ShouldSpawnMotesAt() || MoteCounter.Saturated)
     {
         return;
     }
     MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(ThingDef.Named("Mote_MicroSparksBlue"), 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());
 }