public void Attack(KeyCode fireKey) { if (_canFire) { switch (_weapon) { case Weapon.ICEGUN: _iceGun.CanFire(weaponElement); break; case Weapon.FLAMETHROWER: _flameThrower.CanFire(weaponElement); break; case Weapon.CANNON: _cannon.CanFire(weaponElement); break; } } _canFire = false; }