Exemple #1
0
    public void SelectLaserKeyboard(KeyCode key)
    {
        if (Input.GetKeyDown(key) && weaponAndAmmoManager.hasLaser)
        {
            trapControl.enabled    = false;
            laserControl.enabled   = true;
            grenadeControl.enabled = false;
            knifeControl.enabled   = false;
            trapControl.trap.SetActive(false);
            laserControl.laserPistol.SetActive(true);
            knifeControl.knife.SetActive(false);
            grenadeControl.firstPersonModel.SetActive(false);

            fpc.DeactivateCameraGun();
            cameragunControl.DeactivateCameraOnWeaponSwitch();
            cameragunControl.enabled = false;
            cameragunControl.firstPersonModel.SetActive(false);
        }
    }