diff --git a/DepthsBelow/DepthsBelow/Component/Collision.cs b/DepthsBelow/DepthsBelow/Component/Collision.cs index 4123c1b..717d152 100644 --- a/DepthsBelow/DepthsBelow/Component/Collision.cs +++ b/DepthsBelow/DepthsBelow/Component/Collision.cs @@ -19,7 +19,7 @@ namespace DepthsBelow.Component { this.Width = width; this.Height = height; - this.Rectangle = new Rectangle(0, 0, width, height); + this.Rectangle = new Rectangle(0, 0, width, height); } public void Update(GameTime gameTime) { diff --git a/DepthsBelow/DepthsBelow/MouseInput.cs b/DepthsBelow/DepthsBelow/MouseInput.cs index 104c3b3..157f129 100644 --- a/DepthsBelow/DepthsBelow/MouseInput.cs +++ b/DepthsBelow/DepthsBelow/MouseInput.cs @@ -49,7 +49,8 @@ namespace DepthsBelow if (ms.LeftButton == ButtonState.Released && selectionRectangle != Rectangle.Empty) { - if (selectionRectangle.Intersects(core.soldier.collision.Rectangle)) + + if (selectionRectangle.Intersects(core.soldier.GetComponent().Rectangle)) { core.soldier.selected = true; }