Hello all,
I have a list of 100 wasps in a scene.
I need to pick 10 waspss at button press, overall 10 iterations.
Once the group of 10 objects was picked they do something.
this is the script:
public void LessWasps()
{
for (int i = Wasps.Count -1; i>10; i--) //i=10 so once all the bees are out this wont work
{
WaspDriver wasp = Wasps*;*
wasp.ResetTargets(false);
StartCoroutine(SmoothRotate(wasp.gameObject, Quaternion.Euler(0, 180, 0), 1.5f, () =>
{
StartCoroutine(TravelCoroutine(wasp.gameObject, WaspWindowWaypointPosition.Center, PhaseTransitionTime, postAction: () =>
{
StartCoroutine(TravelCoroutine(wasp.gameObject, Vector3.up * 200 + Vector3.back * 200, PhaseTransitionTime, postAction: () => Destroy(wasp)));
}));
}));
}
}