Example #1
0
 public static void ApplyLlamaGunPowerup(Player player, Vehicle vehicle, LlamaGunPowerup powerup)
 {
     foreach (Weapon weapon in vehicle.Weapons)
     {
         if (weapon is LlamaGun)
         {
             return;
         }
     }
     player.HasLlama = true;
     vehicle.Weapons.Add(new LlamaGun(player.simulator));
 }
Example #2
0
 public static void ApplyPowerup(Player player, Vehicle vehicle, Powerup powerup)
 {
     if (powerup is RateOfFirePowerup)
     {
         Player.ApplyRateOfFirePowerup(vehicle, powerup as RateOfFirePowerup);
     }
     else if (powerup is MaxHealthPowerup)
     {
         Player.ApplyMaxHealthPowerup(vehicle, powerup as MaxHealthPowerup);
     }
     else if (powerup is HealthPowerup)
     {
         Player.ApplyHealthPowerup(vehicle, powerup as HealthPowerup);
     }
     else if (powerup is UziPowerup && player != null)
     {
         Player.ApplyUziPowerup(player, vehicle, powerup as UziPowerup);
     }
     else if (powerup is LlamaGunPowerup && player != null)
     {
         Player.ApplyLlamaGunPowerup(player, vehicle, powerup as LlamaGunPowerup);
     }
     else if (powerup is DamagePowerup)
     {
         Player.ApplyDamageBonusPowerup(vehicle, powerup as DamagePowerup);
     }
     else if (powerup is AccuracyPowerup)
     {
         Player.ApplyAccuracyPowerup(vehicle, powerup as AccuracyPowerup);
     }
     else if (powerup is BurstPowerup)
     {
         Player.ApplyBurstPowerup(vehicle, powerup as BurstPowerup);
     }
 }
Example #3
0
 public static void ApplyPowerup(Player player, List<Vehicle> vehicles, Powerup powerup)
 {
     foreach (Vehicle vehicle in vehicles)
     {
         Player.ApplyPowerup(player, vehicle, powerup);
     }
 }
Example #4
0
 public static void ApplyUziPowerup(Player player, Vehicle vehicle, UziPowerup powerup)
 {
     foreach (Weapon weapon in vehicle.Weapons)
     {
         if (weapon is Uzi)
         {
             return;
         }
     }
     player.HasUzi = true;
     vehicle.Weapons.Add(new Uzi(player.simulator));
 }