Exemple #1
0
    /// <summary>
    /// Hides the player UI and unlocks the mouse cursor from the centre of the screen
    /// </summary>
    void EnableMenuInput()
    {
        GameObject currentPlayer = objectManager.GetCurrentPlayer();

        PlayerInput playerInput = currentPlayer.GetComponent <PlayerInput>();

        playerInput.DisableAllInput();
        if (gameStarted)
        {
            playerInput.AbleToPause(true);
        }

        currentPlayer.GetComponent <PlayerUI>().ShowPlayerUI(false);

        Cursor.lockState = CursorLockMode.Confined;
        Cursor.visible   = true;
    }