Inserted selection collision with soldier

This commit is contained in:
Niklas Ulf Anders Cullberg
2012-09-25 21:52:21 +02:00
parent 7e88d7c68a
commit e1a519cd28
2 changed files with 3 additions and 2 deletions
@@ -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)
{
+2 -1
View File
@@ -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<Component.Collision>().Rectangle))
{
core.soldier.selected = true;
}