Enemy Spawner Script 1
Enemy Spawner Script 1
Collections;
using System.Collections.Generic;
using UnityEngine;
//variable for storing distance between the player and the spawn point
//variable for refrencing the spawn points one after the other
//enemy prefab
void Start()
{
spawnpoints[i] = spawnerparent.GetChild(i);
Sp = spawnpoints[0];
void Update()
//function to load the next spawnpoint after the first one is reached
emscript.Espeed = -2;
next();
void next()
spawnpointindex++;
Sp = spawnpoints[spawnpointindex];