private void Update() { if (!m_isTransitioning && !m_lockedIn) { float xDir = InputWrapper.GetHorizontalAxis(m_playerID); //Replace all these with input manager obviously if (xDir <= -0.3f && m_currentCharacterIndex != 0) { StartCoroutine(ChangeSelectedCharacter(-1)); } else if (xDir >= 0.3f && m_currentCharacterIndex != 2) { StartCoroutine(ChangeSelectedCharacter(1)); } else if (InputWrapper.GetAButton(m_playerID) || Input.GetKeyDown(KeyCode.A)) { LockInSelection(); } } else if (m_lockedIn && InputWrapper.GetBButton(m_playerID)) { CharacterSelectMenu.i.UnselectCharacter(m_playerID); m_lockedIn = false; } }
void Update() { if (playerInputEnabled) { inputPrev = input; input.y = InputWrapper.GetVerticalAxis(); input.x = InputWrapper.GetHorizontalAxis(); if (chargingSlash) { ChargeSlash(); } if (savedSlashCharge > 0) { ApplySlashDistance(); } else { Move(); if (Input.GetKeyDown(KeyCode.Space)) { BeginSlash(); } if (Input.GetKeyUp(KeyCode.Space) && chargingSlash) { ReleaseSlash(); } } } }