From 8342d5e3bfdd247d6a205577a2a60f80616921e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Fri, 2 May 2014 10:05:18 +0200 Subject: [PATCH] Draw dragons in different colors than players --- src/Gui/MapPanel.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Gui/MapPanel.cs b/src/Gui/MapPanel.cs index 3e9e9d0..89e52a7 100644 --- a/src/Gui/MapPanel.cs +++ b/src/Gui/MapPanel.cs @@ -80,18 +80,18 @@ namespace WorldOfPeacecraft IEnumerable dragons = Backend.GetDragons (); IEnumerable players = Backend.GetPlayers (); foreach (IPositionable dragon in dragons) { - PaintEntity (g, dragon); + PaintEntity (g, dragon, Color.Red); } foreach (IPositionable player in players) { - PaintEntity (g, player); + PaintEntity (g, player, Color.LightGreen); } } - public void PaintEntity (Graphics g, IPositionable entity) + public void PaintEntity (Graphics g, IPositionable entity, Color color) { int x = entity.GetX () * TileSize + TileSize / 2 - EntitySize / 2; int y = entity.GetY () * TileSize + TileSize / 2 - EntitySize / 2; - g.FillRectangle (new SolidBrush (Color.Red), x, y, EntitySize, EntitySize); + g.FillRectangle (new SolidBrush (color), x, y, EntitySize, EntitySize); g.DrawRectangle (new Pen( new SolidBrush (Color.Black)), x, y, EntitySize, EntitySize); } }