Beispiel #1
0
 public void SpawnRandomCard(Vector3 enemyPosition)
 {
     int cardType = Engine.Randomize(1, 5);
     switch (cardType)
     {
         case 1:
             RedCard redCard = new RedCard();
             redCard.SpawnedByQueen(enemyPosition);
             enemyList.Add(redCard);
             break;
         case 2:
             BlackCard blackCard = new BlackCard();
             blackCard.SpawnedByQueen(enemyPosition);
             enemyList.Add(blackCard);
             break;
         case 3:
             AceCard aceCard = new AceCard();
             aceCard.SpawnedByQueen(enemyPosition);
             enemyList.Add(aceCard);
             break;
         case 4:
             JackCard jackCard = new JackCard();
             jackCard.SpawnedByQueen(enemyPosition);
             enemyList.Add(jackCard);
             break;
     }
 }
Beispiel #2
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
 }