Made that last more efficient...
This commit is contained in:
@@ -107,13 +107,14 @@ namespace DepthsBelow
|
|||||||
// Send orders with right click
|
// Send orders with right click
|
||||||
if (ms.RightButton == ButtonState.Released && lastMouseState.RightButton == ButtonState.Pressed)
|
if (ms.RightButton == ButtonState.Released && lastMouseState.RightButton == ButtonState.Pressed)
|
||||||
{
|
{
|
||||||
foreach (var unit in core.Squad)
|
if (checkingDirection == false)
|
||||||
if (unit.Selected)
|
{
|
||||||
{
|
foreach (var unit in core.Squad)
|
||||||
if (checkingDirection == false) {
|
if (unit.Selected)
|
||||||
unit.GetComponent<Component.PathFinder>().Goal = Grid.WorldToGrid(mouseWorldPos);
|
{
|
||||||
|
unit.GetComponent<Component.PathFinder>().Goal = Grid.WorldToGrid(mouseWorldPos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (ms.RightButton == ButtonState.Pressed)
|
if (ms.RightButton == ButtonState.Pressed)
|
||||||
|
|||||||
Reference in New Issue
Block a user