public ISet <IEnemy> LoadEnemies(IDictionary <string, IDoor> doors, IDictionary <int, IPlayer> players) { ISet <IEnemy> enemies = new HashSet <IEnemy>(); IDictionary <Vector2, string> enemyInfo = parser.Enemies; foreach (KeyValuePair <Vector2, String> entry in enemyInfo) { IEnemy enemy; if (entry.Value.Equals("Aquamentus")) { enemy = new Aquamentus(doors, game.ProjectileManager, players.Values); } else if (entry.Value.Equals("Gel")) { enemy = new Gel(); } else if (entry.Value.Equals("Goriya")) { enemy = new Goriya(this.game.ProjectileManager); } else if (entry.Value.Equals("Keese")) { enemy = new Keese(); } else if (entry.Value.Equals("LFWallmaster")) { enemy = new LFWallmaster(); } else if (entry.Value.Equals("RFWallmaster")) { enemy = new RFWallmaster(); } else if (entry.Value.Equals("Stalfo")) { enemy = new Stalfo(); if (enemies.Count == 1 && (RoomNumber() == 2 || RoomNumber() == 12)) { enemy.Item = new Key(); } } else if (entry.Value.Equals("Snake")) { enemy = new Snake(players); } else if (entry.Value.Equals("Dodongo")) { enemy = new Dodongo(); } else if (entry.Value.Equals("Fire")) { enemy = new Fire(game, players); } else if (entry.Value.Equals("Zol")) { enemy = new Zol(); } else //trap { enemy = new Trap(players.Values); } enemy.X = (int)entry.Key.X; enemy.Y = (int)entry.Key.Y + 120; enemies.Add(enemy); int rand = random.Next(0, 22); if (enemy.Item == null && !(enemy is Keese || enemy is Aquamentus)) { if (0 <= rand && rand <= 8) { enemy.Item = new Rupee(); } else if (9 <= rand && rand <= 12) { enemy.Item = new Heart(); } else if (rand == 14) { enemy.Item = new Clock(players); } else if (rand == 15) { enemy.Item = new Fairy(); } else if (rand == 20) { enemy.Item = new BlueRupee(); } else if (16 <= rand && rand <= 26 && enemy is Goriya) { enemy.Item = new Bomb(); } } } return(enemies); }
public NotBreathingAquamentusState(Aquamentus aquamentus) : base(aquamentus) { aquamentus.Sprite = EnemySpriteFactory.Instance.CreateMovingAquamentusSprite(); aquamentus.Sprite.Position = new Point(aquamentus.X, aquamentus.Y); fireTimer = 120; // ~2sec }
public BreathingAqumentusState(Aquamentus aquamentus) : base(aquamentus) { aquamentus.Sprite = EnemySpriteFactory.Instance.CreateMovingFireAquamentusSprite(); aquamentus.Sprite.Position = new Point(aquamentus.X, aquamentus.Y); BreathFire(); }
public AquamentusState(Aquamentus aquamentus) { this.aquamentus = aquamentus; }