public void shoot(Mob.Mob mob) { Shoot bullet; switch (getType()) { case EType.SPEED: {bullet = new Fast(mob, this); break;} case EType.STRENGHT: { bullet = new Spread(mob, this); break; } default: {bullet = new Bullet(mob, this); break;} } _game.BulletList.Add(bullet); }
public override void putInRange(Mob.Mob mob) { foreach (Mob.Mob m in listTarget) { if (mob == m) return; } if ((System.Math.Sqrt(System.Math.Pow((mob.MobPos.X - (_position.X * _game.size_case)), 2) + System.Math.Pow((mob.MobPos.Y - (_position.Y * _game.size_case)), 2))) <= _range) { listTarget.Add(mob); } }
public override void removeMobCorpse(Mob.Mob mob) { int i = 0; while (i < listTarget.Count) { if (mob == listTarget[i]) listTarget.RemoveAt(i); i++; } }
public void mobIsDead(Mob.Mob mob) { int i = 0; _central.AddCapital((int) (mob.MobMaxPV * CoefBonus)); while (i < MobList.Count) { if (mob == MobList[i]) MobList.RemoveAt(i); i++; } foreach (Node myTurret in TurretList) { myTurret.removeMobCorpse(mob); } }