public void GenerateRandomly()
    {
        spawnList = new List <EnemySpawnListItem>();
        float spawntime = 0f;

        for (int i = 0; i < 50; ++i)
        {
            spawntime += Random.Range(minSpawnTime, maxSpawnTime);
            float position = Random.Range(minSpawnPosition, maxSpawnPosition);
            float index    = Random.Range(0, enemies.list.Count);
            EnemyList.EnemyData enemyData = enemies.list[(int)index];

            EnemySpawnListItem spawnEvent = new EnemySpawnListItem(spawntime, position, enemyData);

            spawnList.Add(spawnEvent);
        }
    }
  public EnemySpawnListItem(float time, float position, EnemyList.EnemyData data) {
      this.time = time;
      this.spawnPosition = position;
      this.enemyData = data;
 }