// Update is called once per frame void Update() { if (Input.GetButtonDown("Fire1")) { if (currentGun != null) { currentGun.Action(); } } if (Input.GetKeyDown(KeyCode.Keypad1) || Input.GetKeyDown(KeyCode.Alpha1)) { SwitchWeapon(EnumWeapons.FIRST_WEAPON); } if (Input.GetKeyDown(KeyCode.Keypad2) || Input.GetKeyDown(KeyCode.Alpha2)) { SwitchWeapon(EnumWeapons.SECOND_WEAPON); } }