Beispiel #1
0
 public override void Draw(GameTime gameTime, MyGraphicsClass graphics)
 {
     if (controllingPlayer.Value == null)
     {
         this.Collidable.Draw(graphics, this.Position, this.Direction);
     }
     else
     {
         this.Collidable.Draw(graphics, this.Position, this.Direction, controllingPlayer.Value.Color);
     }
     graphics.DrawDebugFont(this.materiel.Value.ToString(), this.Position + new Vector2(25, 0), 1f);
 }
 public void DrawCompanyList(GameTime gameTime, MyGraphicsClass myGraphicsClass, Camera camera)
 {
     int count = 0;
     foreach (Company co in this.companies.Value)
     {
         if (co != null)
         {
             Vector2 textSize = MyGraphicsClass.Font.MeasureString(co.GetHudText());
             myGraphicsClass.DrawDebugFont(co.GetHudText(), new Vector2(0, count), 1);
             count = count + (int)(textSize.Y);
             co.DrawScreen(gameTime, myGraphicsClass, camera, Color.Gray, .9f);
         }
     }
 }
 public override void Draw(GameTime gameTime, MyGraphicsClass graphics)
 {
     base.Draw(gameTime, graphics);
     graphics.DrawDebugFont("T", this.Position + new Vector2(25, 15), 1f);
 }
 public void DrawCompanySelection(GameTime gameTime, MyGraphicsClass myGraphicsClass, Company selectedCo)
 {
     int count = 0;
     foreach (Company co in this.companies.Value)
     {
         if (co != null)
         {
             Vector2 textSize = MyGraphicsClass.Font.MeasureString(co.GetHudText());
             if (co == selectedCo)
             {
                 myGraphicsClass.DrawRectangle(new Vector2(0, count), textSize, new Vector2(0), 0, Color.Red, 1);
                 myGraphicsClass.DrawDebugFont("X", new Vector2(textSize.X + 5, count), 1);
             }
             count = count + (int)(textSize.Y);
         }
     }
 }