Beispiel #1
0
 /// <summary>
 /// Shuffles a list of game objects using the Fisher-Yates shuffle algorithm
 /// </summary>
 /// <param name="list"> The list to shuffle </param>
 private void Shuffle(IList <EnemySpawn> list)
 {
     for (int i = 0; i < list.Count; ++i)
     {
         int        j     = random.Next(i, list.Count);
         EnemySpawn value = list[i];
         list[i] = list[j];
         list[j] = value;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Adds an enemy to be respawned.
 /// </summary>
 /// <param name="enemySpawn"> The info for the enemy to respawn </param>
 public void AddRespawn(EnemySpawn enemySpawn)
 {
     respawns.Add(enemySpawn);
 }