private void CheckPlayerActions() { if (InputManager._inst == null) { return; } if (Input.GetKey(InputManager._inst._keyBindings[InputAction.attack])) { FireProjectile(); } if (Input.GetKeyDown(InputManager._inst._keyBindings[InputAction.nextItem])) { if (pHand != null) { pHand.NextCard(); // reset this value so player doesn't have to wait to shoot if imediatly switching weapons timeSinceLastAttack = 0f; } } if (Input.GetKeyDown(InputManager._inst._keyBindings[InputAction.prevItem])) { if (pHand != null) { pHand.PrevCard(); // reset this value so player doesn't have to wait to shoot if imediatly switching weapons timeSinceLastAttack = 0f; } } }
public void NextCard(ref Card card) { if (!hand.HaveCard(CardType.GivenOut)) { card.gameObject.SetActive(false); return; } card.FillingCard(hand.NextCard()); }