private void Update() { // handle shooting SpellController basicSpell = m_SpellSlots[basicSpellIndex]; basicSpell.HandleShootInputs( m_InputHandler.GetFireInputDown(), m_InputHandler.GetFireInputHeld(), m_InputHandler.GetFireInputReleased()); SpellController altSpell = m_SpellSlots[altSpellIndex]; altSpell.HandleShootInputs( m_InputHandler.GetAltInputDown(), m_InputHandler.GetAltInputHeld(), m_InputHandler.GetAltInputReleased()); SpellController utilitySpell = m_SpellSlots[utilitySpellIndex]; utilitySpell.HandleShootInputs( m_InputHandler.GetUtilityInputDown(), m_InputHandler.GetUtilityInputHeld(), m_InputHandler.GetUtilityInputReleased()); SpellController ultimateSpell = m_SpellSlots[ultimateSpellIndex]; ultimateSpell.HandleShootInputs( m_InputHandler.GetUltimateInputDown(), m_InputHandler.GetUltimateInputHeld(), m_InputHandler.GetUltimateInputReleased()); SpellController interactSpell = interactionController; interactSpell.HandleShootInputs( m_InputHandler.GetInteractInputDown(), m_InputHandler.GetInteractInputHeld(), m_InputHandler.GetInteractInputReleased()); // Pointing at enemy handling // isPointingAtEnemy = false; // if(Physics.Raycast(SpellCamera.transform.position, SpellCamera.transform.forward, out RaycastHit hit, 1000, -1, QueryTriggerInteraction.Ignore)) // { // if(hit.collider.GetComponentInParent<EnemyCharacterController>()) // { // isPointingAtEnemy = true; // } // } }
int GetSpellInputDown() { if (m_PlayerInputHandler.GetFireInputDown()) { return(0); } if (m_PlayerInputHandler.GetAltInputDown()) { return(1); } if (m_PlayerInputHandler.GetUtilityInputDown()) { return(2); } // if (m_PlayerInputHandler.GetUltimateInputDown()) { // return 3; // } return(-1); }