Beispiel #1
0
        public static void DrawGhostThing(IntVec3 center, Rot4 rot, ThingDef thingDef, Graphic baseGraphic, Color ghostCol, AltitudeLayer drawAltitude)
        {
            if (baseGraphic == null)
            {
                baseGraphic = thingDef.graphic;
            }
            Graphic graphic = GhostDrawer.GhostGraphicFor(baseGraphic, thingDef, ghostCol);
            Vector3 loc     = Gen.TrueCenter(center, rot, thingDef.Size, Altitudes.AltitudeFor(drawAltitude));

            graphic.DrawFromDef(loc, rot, thingDef, 0f);
            if (thingDef.PlaceWorkers != null)
            {
                for (int i = 0; i < thingDef.PlaceWorkers.Count; i++)
                {
                    thingDef.PlaceWorkers[i].DrawGhost(thingDef, center, rot);
                }
            }
        }
Beispiel #2
0
        public static void DrawGhostThing(IntVec3 center, Rot4 rot, ThingDef thingDef, Graphic baseGraphic, Color ghostCol, AltitudeLayer drawAltitude)
        {
            if (baseGraphic == null)
            {
                baseGraphic = thingDef.graphic;
            }
            Graphic graphic = GhostUtility.GhostGraphicFor(baseGraphic, thingDef, ghostCol);
            Vector3 loc     = GenThing.TrueCenter(center, rot, thingDef.Size, drawAltitude.AltitudeFor());

            graphic.DrawFromDef(loc, rot, thingDef, 0f);
            for (int i = 0; i < thingDef.comps.Count; i++)
            {
                thingDef.comps[i].DrawGhost(center, rot, thingDef, ghostCol, drawAltitude);
            }
            if (thingDef.PlaceWorkers != null)
            {
                for (int j = 0; j < thingDef.PlaceWorkers.Count; j++)
                {
                    thingDef.PlaceWorkers[j].DrawGhost(thingDef, center, rot, ghostCol);
                }
            }
        }