Beispiel #1
0
 private void InstantiateEnemies()
 {
     m_enemies = new List <EnemyCharacter>();
     for (int i = 0, count = m_level.Data.Enemies.Count; i < count; i++)
     {
         if (i < m_levelEntity.EnemySpawnPoints.Count)
         {
             var newEnemy = new EnemyCharacter(m_level.Data.Enemies[i], this);
             newEnemy.CreateEntity(m_levelEntity.EnemySpawnPoints[i].SpawnPosition.position);
             newEnemy.Entity.SetDirection(CharacterEntity.EDirection.Left);
             m_enemies.Add(newEnemy);
         }
     }
 }