示例#1
0
        public override void draw(Rectangle bounds, SpriteBatch sb)
        {
            base.draw(bounds, sb);
            if (!this.IsSubscribedForUpdates)
            {
                this.Update((float)this.os.lastGameTime.ElapsedGameTime.TotalSeconds);
            }
            Rectangle dest = Utils.InsetRectangle(bounds, 1);

            this.DrawMap(dest, sb);
            this.DrawHeadings(new Rectangle(bounds.X, bounds.Y, (int)((double)bounds.Width * 0.666), (int)((double)bounds.Height * 0.666)), sb);
            AircraftAltitudeIndicator.RenderAltitudeIndicator(dest, sb, (int)(this.CurrentAltitude + 0.5), this.IsInCriticalDescent(), AircraftAltitudeIndicator.GetFlashRateFromTimer(OS.currentInstance.timer), 50000, 40000, 30000, 14000, 3000);
        }
示例#2
0
 public void Draw(Rectangle dest, SpriteBatch sb)
 {
     if (!this.IsActive || (double)Utils.randm(1f) < (double)this.flashInTimeLeft)
     {
         return;
     }
     if (this.CrashingAircraft != null)
     {
         AircraftAltitudeIndicator.RenderAltitudeIndicator(dest, sb, (int)this.CrashingAircraft.CurrentAltitude, this.CrashingAircraft.IsInCriticalDescent(), AircraftAltitudeIndicator.GetFlashRateFromTimer(this.os.timer), 50000, 40000, 30000, 14000, 3000);
     }
     else
     {
         AircraftAltitudeIndicator.RenderAltitudeIndicator(dest, sb, 0, true, AircraftAltitudeIndicator.GetFlashRateFromTimer(this.os.timer), 50000, 40000, 30000, 14000, 3000);
     }
 }