Inserted calculation if hover over enemy
Though text is not displayed, only the calculation is done.
This commit is contained in:
@@ -118,6 +118,20 @@ namespace DepthsBelow
|
|||||||
readjust = false;
|
readjust = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//Calculating chance to hit if holding cursor over enemy
|
||||||
|
foreach (var unit in core.Squad)
|
||||||
|
{
|
||||||
|
if (unit.Selected == true && unit.Fired == false)
|
||||||
|
{
|
||||||
|
foreach (var enemy in core.Swarm)
|
||||||
|
{
|
||||||
|
if (gridRectangle.Intersects(enemy.GetComponent<Component.Collision>().Rectangle))
|
||||||
|
{
|
||||||
|
Utility.CalculateHitChance(unit, enemy);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// When the mouse is released
|
// When the mouse is released
|
||||||
if (ms.LeftButton == ButtonState.Released && selectionRectangle != Rectangle.Empty)
|
if (ms.LeftButton == ButtonState.Released && selectionRectangle != Rectangle.Empty)
|
||||||
|
|||||||
Reference in New Issue
Block a user