Ejemplo n.º 1
0
 /// <summary>spawn enemy based on enemyType at random position</summary>
 public void SpawnEnemy(Enemy.EnemyType enemyType)
 {
     int spawnZ = Engine.Randomize(-100, 100);
     int spawnX = Engine.Randomize(-100, 100);
     Vector3 enemyPosition = new Vector3(spawnX, 0, spawnZ);
     ConstructEnemy(enemyType, enemyPosition);
 }
Ejemplo n.º 2
0
 /// <summary>spawn enemy based on enemyType at enemyPosition</summary>
 public void SpawnEnemy(Enemy.EnemyType enemyType, Vector3 enemyPosition)
 {
     ConstructEnemy(enemyType, enemyPosition);
 }
Ejemplo n.º 3
0
 //initialize enemy & add to enemyList
 private void ConstructEnemy(Enemy.EnemyType enemyType, Vector3 enemyPosition)
 {
     switch (enemyType)
     {
         case Enemy.EnemyType.AceCard:
             {
                 AceCard aceCard = new AceCard();
                 aceCard.Initialize(enemyPosition);
                 enemyList.Add(aceCard);
             }
             break;
         case Enemy.EnemyType.AliceBookworm:
             {
                 AliceBookworm aliceBookworm = new AliceBookworm();
                 aliceBookworm.Initialize(enemyPosition);
                 enemyList.Add(aliceBookworm);
             }
             break;
         case Enemy.EnemyType.BlackCard:
             {
                 BlackCard blackCard = new BlackCard();
                 blackCard.Initialize(enemyPosition);
                 enemyList.Add(blackCard);
             }
             break;
         case Enemy.EnemyType.Caterpillar:
             {
                 Caterpillar caterpillar = new Caterpillar();
                 caterpillar.Initialize(enemyPosition);
                 enemyList.Add(caterpillar);
             }
             break;
         case Enemy.EnemyType.CheshireCat:
             {
                 CheshireCat cheshireCat = new CheshireCat();
                 cheshireCat.Initialize(enemyPosition);
                 enemyList.Add(cheshireCat);
             }
             break;
         case Enemy.EnemyType.Hedgehog:
             {
                 Hedgehog hedgeHog = new Hedgehog();
                 hedgeHog.Initialize(enemyPosition);
                 enemyList.Add(hedgeHog);
             }
             break;
         case Enemy.EnemyType.JackCard:
             {
                 JackCard jackCard = new JackCard();
                 jackCard.Initialize(enemyPosition);
                 enemyList.Add(jackCard);
             }
             break;
         case Enemy.EnemyType.KingHearts:
             {
                 KingHearts kingHearts = new KingHearts();
                 kingHearts.Initialize(enemyPosition);
                 enemyList.Add(kingHearts);
             }
             break;
         case Enemy.EnemyType.MarchHare:
             {
                 MarchHare marchHare = new MarchHare();
                 marchHare.Initialize(enemyPosition);
                 enemyList.Add(marchHare);
             }
             break;
         case Enemy.EnemyType.MadHatter:
             {
                 MadHatter madHatter = new MadHatter();
                 madHatter.Initialize(enemyPosition);
                 enemyList.Add(madHatter);
             }
             break;
         case Enemy.EnemyType.QueenHearts:
             {
                 QueenHearts queenHearts = new QueenHearts();
                 queenHearts.Initialize(enemyPosition);
                 enemyList.Add(queenHearts);
             }
             break;
         case Enemy.EnemyType.RedCard:
             {
                 RedCard redCard = new RedCard();
                 redCard.Initialize(enemyPosition);
                 enemyList.Add(redCard);
             }
             break;
         case Enemy.EnemyType.WhiteRabbit:
             {
                 WhiteRabbit whiteRabbit = new WhiteRabbit();
                 whiteRabbit.Initialize(enemyPosition);
                 enemyList.Add(whiteRabbit);
             }
             break;
     }
     mAnimation.Peek.initializeEnemyAnimation(enemyList); //David Fahr
 }