public void SpawnGems() { Path path = GemPaths[Random.Range(0, GemPaths.Length)]; for (int i = 0; i < 10; i++) { WaypointsMover gem = Instantiate(GemPrefabs); gem.Go(path); } }
public void LaunchRockets() { foreach (Path path in RocketPaths) { WaypointsMover mover = Instantiate(RocketPrefab); mover.OneWayFinished += OnOneWayFinished; mover.Go(path); mover.transform.SetParent(transform); } }