/// <summary> /// Handle player input /// </summary> private void HandleInput() { // Check if player pressed Respawn button respawn.HandleRespawn(); // Get player input (horizontal) horizontalInput = Input.GetAxis("Horizontal"); currentState.direction = GetDirection(horizontalInput) ?? previousState.direction; currentState.oppDirection = GetDirection(-1 * horizontalInput) ?? previousState.oppDirection; // Grab object grabbing = Input.GetButton("Grab"); // Checks jump key JumpDown(); // Update equipped surface based on input EquipSurface(); }