示例#1
0
    // Update is called once per frame
    void Update()
    {
        if ((playerChangePanel.activeSelf || gameStartPanel.activeSelf || roundOverPanel.activeSelf || gameOverPanel.activeSelf) && Input.anyKeyDown)
        {
            if (!gameController.GetPlayRound())
            {
                gameController.SetPlayRound(true);
            }

            //Deactivate panels
            if (playerChangePanel.activeSelf)
            {
                playerChangePanel.SetActive(false);
            }
            else if (gameStartPanel.activeSelf)
            {
                gameStartPanel.SetActive(false);
            }
            else if (roundOverPanel.activeSelf)
            {
                roundOverPanel.SetActive(false);
                videoObject.SetActive(false);
            }
            else if (gameOverPanel.activeSelf)
            {
                gameOverPanel.SetActive(false);
                videoObject.SetActive(false);
                if (gameController.gameOver)
                {
                    pauseMenuScript.GameOver();
                }
            }


            if (!playerTurnPrompt.activeSelf)
            {
                playerTurnPrompt.SetActive(true);
            }


            aimAssistScript.EnableHardAimAssist();
            aimAssistScript.EnableArenaBoundary();

            Input.ResetInputAxes();

            crowdCheerAudioScript.SetCrowdLoop();
        }
    }