using UnityEngine;
public class BlockSpawner : MonoBehaviour {
public Transform[] spawnPoints;
public GameObject u;
public float timeBetweenWaves = 1f;
private float timeToSpawn = 2f;
void Update () {
if (Time.time >= timeToSpawn)
{
SpawnBlocks();
timeToSpawn = Time.time + timeBetweenWaves;
}
}
void SpawnBlocks ()
{
for (int i = 0; i < spawnPoints.Length; i++)
{
{
Instantiate(u, spawnPoints*.position, Quaternion.identity);*
-
}*
-
}*
- }*
}
after one second nothing instantiate