/// <summary> /// Takes every agent passed in through the parameters and converts it to a /// Sausage Dog type enemy /// </summary> /// <param name="affectedAgents">List of enemies currently in the game</param> public override void ApplyEffect(List<Agent> affectedAgents) { if (!inUse) { inUse = true; //Gets each agent in the list and replaces it with a sausage dog enemy for (int i = 0; i < affectedAgents.Count; i++) { Agent tempEnemy = affectedAgents[i]; affectedAgents[i] = new SausageDog(tempEnemy.Health, tempEnemy.Row, tempEnemy.Column); //Consider adding tileProgression as param if used properly in Unity } } }
/// <summary> /// Creates the enemy. /// </summary> /// <returns> /// The enemy. /// </returns> /// <param name='type'> /// Enemy Type. /// </param> public AbstractEnemy CreateEnemy(EnemyType type) { //Switch statement returning enemy depending on EnemyType AbstractEnemy temp = new BasicEnemy(); switch (type) { case EnemyType.BasicEnemy : temp = new BasicEnemy(); break; case EnemyType.SausageDog: temp = new SausageDog(); break; // case EnemyType.BirdWithArms: // temp = new BirdWithArms(); // break; // case EnemyType.FatGaint: // temp = new FatGaint(); // break; // case EnemyType.FishOnLand: // temp = new FishOnLand(); // break; // case EnemyType.FishWithLegs: // temp = new FishWithLegs(); // break; // case EnemyType.Hydra: // temp = new Hydra(); // break; // case EnemyType.Kitten: // temp = new Kitten(); // break; // case EnemyType.Moleman: // temp = new Moleman(); // break; // case EnemyType.NiceEnemy: // temp = new NiceEnemy(); // break; // case EnemyType.TimeBomb: // temp = new TimeBomb(); // break; } return temp; }