public GameObject waterBottle; // The enemy prefab to be spawned.
public float spawnTime = 3f; // How long between each spawn.
public Transform spawnPoints; // An array of the spawn points this enemy can spawn from.
// Use this for initialization
void Start ()
{
InvokeRepeating ("Spawn", spawnTime, spawnTime);
}
void Spawn ()
{
int spawnPointIndex = Random.Range (0, spawnPoints.Length);
GameObject waterbottleClone;
waterbottleClone = Instantiate (waterBottle, spawnPoints[spawnPointIndex].position, spawnPoints[spawnPointIndex].rotation)as GameObject;
Destroy (waterbottleClone, 6f);
}