public static Mote MakeStunOverlay(Thing stunnedThing)
        {
            Mote mote = (Mote)ThingMaker.MakeThing(ThingDefOf.Mote_Stun, null);

            mote.Attach(stunnedThing);
            GenSpawn.Spawn(mote, stunnedThing.Position, stunnedThing.Map);
            return(mote);
        }
        public static Mote MakeStunOverlay(Thing stunnedThing)
        {
            Mote obj = (Mote)ThingMaker.MakeThing(ThingDefOf.Mote_Stun);

            obj.Attach(stunnedThing);
            GenSpawn.Spawn(obj, stunnedThing.Position, stunnedThing.Map);
            return(obj);
        }
        // Token: 0x06000013 RID: 19 RVA: 0x0000283C File Offset: 0x00000A3C
        public static void DoCamoOverlay(Pawn pawn, string CamoMote)
        {
            Mote mote = (Mote)ThingMaker.MakeThing(ThingDef.Named(CamoMote), null);

            mote.Attach(pawn);
            if (GenGrid.InBounds(pawn.Position, pawn.Map))
            {
                GenSpawn.Spawn(mote, pawn.Position, pawn.Map, 0);
            }
        }
        public static Mote MakeAttachedOverlay(Thing thing, ThingDef moteDef, Vector3 offset, float scale = 1f, float solidTimeOverride = -1f)
        {
            Mote obj = (Mote)ThingMaker.MakeThing(moteDef);

            obj.Attach(thing);
            obj.Scale             = scale;
            obj.exactPosition     = thing.DrawPos + offset;
            obj.solidTimeOverride = solidTimeOverride;
            GenSpawn.Spawn(obj, thing.Position, thing.MapHeld);
            return(obj);
        }
Beispiel #5
0
        //public static void ThrowGenericMote(ThingDef moteDef, Vector3 loc, Map map, float scale, float solidTime, float fadeIn, float fadeOut, int rotationRate, float velocity, float velocityAngle, float lookAngle)
        public static Mote MakeOverlay(Thing target, ThingDef moteDef, Map map, Vector3 offset, float scale, float lookAngle, float fadeIn, float fadeOut, float solidTimeOverride, float growthRate)
        {
            Mote obj = (Mote)ThingMaker.MakeThing(moteDef);

            obj.Attach(target);
            obj.Scale                = scale;
            obj.exactPosition        = target.DrawPos + offset;
            obj.exactRotation        = lookAngle;
            obj.def.mote.fadeInTime  = fadeIn;
            obj.def.mote.fadeOutTime = fadeOut;
            obj.def.mote.growthRate  = growthRate;
            obj.solidTimeOverride    = solidTimeOverride;
            GenSpawn.Spawn(obj, target.Position, map);
            return(obj);
        }