private void Update() { inputBuffer.Update(); if (currentWeapon != null) { bool actionRequested = currentWeapon.CheckForInput(inputBuffer); if (actionRequested) { inputBuffer.Clear(); } } if (!IsChangingWeapon) { if (Input.GetKeyDown(KeyCode.Alpha1)) { if (currentWeapon.GetType() != typeof(KatanaWeapon)) { setNewWeapon(katanaWeapon); } } else if (Input.GetKeyDown(KeyCode.Alpha2)) { if (currentWeapon.GetType() != typeof(RevolverWeapon)) { setNewWeapon(revolverWeapon); } } } }