private void SpawnMonsters(LevelPoint[] enemySpawnPoints) { int count = 0; foreach (LevelPoint point in enemySpawnPoints) { try { int index = UnityEngine.Random.Range(0, monsterPrefabs.Length); SpawnAtLocation.Spawn(point.X, point.Y, monsterPrefabs[index]); count++; if (count == monsterCount) { break; } } catch (Exception e) { Debug.LogError(e); } } }
private void SpawnPlayer() { SpawnAtLocation.Spawn(m_builder.StartPoint.X, m_builder.StartPoint.Y, playerPrefab); }