no message
This commit is contained in:
@@ -74,6 +74,17 @@ public class UnitCommander : MonoBehaviour
|
||||
//called when we command units to gather a resource
|
||||
void UnitsGatherResource(ResourceSource resource, Unit[] units)
|
||||
{
|
||||
|
||||
if(units.Length == 1)
|
||||
{
|
||||
units[0].GatherResource(resource, UnitMover.GetUnitDestinationAroundResource(resource.transform.position));
|
||||
}
|
||||
else
|
||||
{
|
||||
Vector3[] destinations = UnitMover.GetUnitGroupDestinationsAroundResource(resource.transform.position, units.Length);
|
||||
for(int x = 0; x <units.Length; x++)
|
||||
{
|
||||
units[x].GatherResource(resource, destinations[x]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user