Exemple #1
0
 public override void PostDraw()
 {
     if (this.brokenDownInt)
     {
         OverlayDrawer.DrawOverlay(this.parent, OverlayTypes.BrokenDown);
     }
 }
        public override void Draw()
        {
            base.Draw();
            CompPowerBattery comp = base.GetComp <CompPowerBattery>();

            GenDraw.FillableBarRequest r = default(GenDraw.FillableBarRequest);
            r.center      = this.DrawPos + Vector3.up * 0.1f;
            r.size        = Building_BatteryMk2.BarSize;
            r.fillPercent = comp.StoredEnergy / comp.props.storedEnergyMax;
            r.filledMat   = Building_BatteryMk2.BarFilledMat;
            r.unfilledMat = Building_BatteryMk2.BarUnfilledMat;
            r.margin      = 0.15f;
            IntRot rotation = base.Rotation;

            rotation.Rotate(RotationDirection.Clockwise);
            r.rotation = rotation;
            GenDraw.DrawFillableBar(r);
            if (this.ticksToExplode > 0)
            {
                OverlayDrawer.DrawOverlay(this, OverlayTypes.BurningWick);
            }
        }