예제 #1
0
 public override void Draw(IDrawContext context)
 {
     if (IsVisible)
     {
         context.Draw(texture, Center, null, Color.White, Angle, OffsetToCenter, new Vector2(1, 1), SpriteEffects.None, 0);
         DrawHealth(context);
     }
     base.Draw(context);
 }
예제 #2
0
 public override void Draw(IDrawContext context)
 {
     context.Draw(texture, Center, sourceRectangle: null, MouseHoverColorTransition.Current, 0, Origin, Vector2.One, SpriteEffects.None, 0);
     if (Globals.ShowMouseCoordinates)
     {
         context.DrawString(GlobalContent.Default.CoordinatesFont, $"{Bounds.Left}:{Bounds.Top}-{Bounds.Right}:{Bounds.Bottom}",
                            new Vector2(Bounds.Left, Bounds.Top - 20), Color.Yellow);
     }
     Weapon?.Draw(context);
     base.Draw(context);
 }
        public override void DrawContent(IDrawContext context)
        {
            const int padding         = 2;
            const int distanceToImage = 10;
            const int lineHeight      = 20;

            context.Draw(image, new Vector2(Bounds.Left, Bounds.Top), Color.White);
            int left = Bounds.Left + image.Width + distanceToImage;
            int top  = Bounds.Top + padding;

            context.DrawString(descriptionFont, WeaponSettings.Name, new Vector2(left, top), Color.Black);
            top += lineHeight;
            context.DrawString(descriptionFont, $"{WeaponSettings.Price:#,##0}e", new Vector2(left, top), Color.Black);
            base.DrawContent(context);
        }
        public override void DrawContent(IDrawContext context)
        {
            Color color;

            switch (FiringState)
            {
            case FiringState.Firing:
                color = FireColorTransition.Current;
                break;

            default:
                color = Color.White;
                break;
            }
            context.Draw(weapon, Center, sourceRectangle: null, color, (float)Rotation, CenterOffset, Vector2.One, SpriteEffects.None, 0);
        }
예제 #5
0
 public override void Draw(IDrawContext context)
 {
     context.Draw(background, Vector2.Zero, Color.White);
     foreach (var wp in WeaponPods)
     {
         wp.Draw(context);
     }
     foreach (var wave in Waves)
     {
         wave.Draw(context);
     }
     if (Globals.ShowPaths)
     {
         foreach (var path in settings.Paths)
         {
             DrawPath(context, path);
         }
     }
     DrawHeader(context);
     ActiveDialog?.Draw(context);
     base.Draw(context);
 }