Exemple #1
0
        public static void ThrowScreamMote(Vector3 loc, Map map, float scale, int r, int g, int b)
        {
            if (!loc.ShouldSpawnMotesAt(map) || map.moteCounter.Saturated)
            {
                return;
            }
            MoteThrown moteThrown = (MoteThrown)ThingMaker.MakeThing(TorannMagicDefOf.Mote_ScreamMote, null);

            moteThrown.Scale         = 1.9f * scale;
            moteThrown.rotationRate  = (float)Rand.Range(-5, 5);
            moteThrown.exactPosition = loc;
            moteThrown.SetVelocity((float)Rand.Range(0, 360), Rand.Range(0.2f, 0.5f));
            ColorInt colorInt = new ColorInt(r, g, b);
            Color    arg_50_0 = colorInt.ToColor;

            moteThrown.SetColor(arg_50_0, false);
            GenSpawn.Spawn(moteThrown, loc.ToIntVec3(), map);
        }