diff options
| author | aldrikboy <aldrikboy@gmail.com> | 2018-01-14 13:42:38 +0100 |
|---|---|---|
| committer | aldrikboy <aldrikboy@gmail.com> | 2018-01-14 13:42:38 +0100 |
| commit | 8d30b5ac461e95cabfc74e46b610beabd81cb460 (patch) | |
| tree | ffe44142cf340670a824111728fb1f2e51653c4d /Penguloon/Objects | |
| parent | 9c9aba58a63315d7b02bd8bf50fc98c18be93ede (diff) | |
upgrade menu
Diffstat (limited to 'Penguloon/Objects')
| -rw-r--r-- | Penguloon/Objects/ObjectBase.cs | 15 |
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); |
