Exemplo n.º 1
0
        public static Vector3 TrueCenter(this Thing t)
        {
            Pawn pawn = t as Pawn;

            if (pawn != null)
            {
                return(pawn.Drawer.DrawPos);
            }
            return(Gen.TrueCenter(t.Position, t.Rotation, t.def.size, t.def.Altitude));
        }
Exemplo n.º 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 = 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);
                }
            }
        }