/// <summary> /// Tries to setup the next spawn /// </summary> /// <returns>true if there is another spawn instruction, false if not</returns> protected bool TrySetupNextSpawn() { bool hasNext = spawnInstructions.Next(ref m_CurrentIndex); if (hasNext) { SpawnInstruction nextSpawnInstruction = spawnInstructions[m_CurrentIndex]; if (nextSpawnInstruction.delayToSpawn <= 0f) { SpawnCurrent(); } else { m_SpawnTimer.SetTime(nextSpawnInstruction.delayToSpawn); } } return(hasNext); }
protected void Spawn() { SpawnInstruction spawnInstruction = spawnInstructions[m_CurrentIndex]; SpawnEnemy(spawnInstruction.agentConfiguration, spawnInstruction.startingNode); }