public void Fire(IWeapon weapon, PlayerView view) { if (!CanFire(weapon)) { return; } Cooldown(weapon.GetWeaponType(), weapon.Cooldown()); switch (weapon.GetWeaponType()) { case WeaponType.Cannon: CannonFire(weapon, view); break; case WeaponType.MachineGun: MachineGunFire(weapon, view); break; } EventHolder <GameEventType> .Dispatcher.Broadcast(GameEventType.AmmoChange, weapon.GetWeaponType(), _fireRate[weapon.GetWeaponType()]); }