summaryrefslogtreecommitdiff
path: root/Penguloon/Objects/ObjectBase.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Penguloon/Objects/ObjectBase.cs')
-rw-r--r--Penguloon/Objects/ObjectBase.cs15
1 files changed, 15 insertions, 0 deletions
diff --git a/Penguloon/Objects/ObjectBase.cs b/Penguloon/Objects/ObjectBase.cs
index 6474afe..aef4e6a 100644
--- a/Penguloon/Objects/ObjectBase.cs
+++ b/Penguloon/Objects/ObjectBase.cs
@@ -35,6 +35,8 @@ namespace Penguloon.Objects
public bool ShouldRotate { get; set; } = true;
+ public bool Selected { get; set; } = false;
+
public ObjectBase(Vector2 position, Map map)
{
this.Map = map;
@@ -162,6 +164,19 @@ namespace Penguloon.Objects
destinationRectangle: rec,
rotation: (float)rot,
origin: new Vector2(Texture.Width / 2, Texture.Height / 2));
+
+ if (Selected)
+ {
+ Rectangle rangeCircleRec = new Rectangle(
+ (int)Position.X + ((TileSpanX * Map.TileWidth) / 2),
+ (int)Position.Y + ((TileSpanY * Map.TileHeight) / 2),
+ (int)(Range * 2), (int)(Range * 2));
+
+ if (RangeCircle != null)
+ Map.ParentScene.Main.SpriteBatch.Draw(RangeCircle,
+ destinationRectangle: rangeCircleRec,
+ origin: new Vector2(RangeCircle.Width / 2, RangeCircle.Height / 2));
+ }
}
public abstract void DrawUnique(float deltaTime);