ShowButton() private méthode

private ShowButton ( Button button, string caption, Action onButtonClick ) : void
button Button
caption string
onButtonClick Action
Résultat void
Exemple #1
0
    /// <summary>
    /// Shows the main menu
    /// </summary>
    private void MainMenu()
    {
        // Reset and generate the level
        hoopArea.ResetHoops();

        // Set the state to "main menu"
        State = GameState.MainMenu;

        // Update the UI
        uiController.ShowBanner("");
        uiController.ShowButton("Start");
        uiController.ShowSlider(true);
        uiController.ShowPlayerPanel(false);
        uiController.ShowOpponentPanel(false);

        // Use the main camera, disable agent cameras
        mainCamera.gameObject.SetActive(true);
        player.agentCamera.gameObject.SetActive(false);
        opponent.agentCamera.gameObject.SetActive(false); // Never turn this back on

        // Reset the agents
        player.OnEpisodeBegin();
        opponent.OnEpisodeBegin();

        // Freeze the agents
        player.FreezeAgent();
        opponent.FreezeAgent();
    }
Exemple #2
0
    /// <summary>
    /// Shows the main menu
    /// </summary>
    private void MainMenu()
    {
        // Set the state to "main menu"
        State = GameState.MainMenu;

        // Update the UI
        uiController.ShowBanner("");
        uiController.ShowButton("Start");

        // Use the main camera, disable agent cameras
        mainCamera.gameObject.SetActive(true);
        player.AgentCamera.gameObject.SetActive(false);
        opponent.AgentCamera.gameObject.SetActive(false); // Never turn this back on

        // Reset the flowers
        flowerArea.ResetFlowers();

        // Reset the agents
        player.OnEpisodeBegin();
        opponent.OnEpisodeBegin();

        // Freeze the agents
        player.FreezeAgent();
        opponent.FreezeAgent();
    }
        ///// <summary>
        ///// Shows the main menu
        ///// </summary>
        private void MainMenu()
        {
            // Set the state to "main menu"
            State = GameState.MainMenu;

            // Update the UI
            uiController.ShowBanner("");
            uiController.ShowButton("Start");

            // Use the main camera, disable agent cameras
            //mainCamera.gameObject.SetActive(true);
            //player.agentCamera.gameObject.SetActive(false);
            //opponent.agentCamera.gameObject.SetActive(false); // Never turn this back on

            // Reset the agents
            P1.OnEpisodeBegin();
            P2.OnEpisodeBegin();

            // Freeze the agents
            P1.FreezeAgent();
            P2.FreezeAgent();
            uiController.setScoreP1(0);
            uiController.setScoreP2(0);
        }
Exemple #4
0
    // Update is called once per frame
    void Update()
    {
        if (answerPlace.GetComponent <AnswerPlaceBehaviour>().hasAnswer)
        {
            // GetComponent<SpriteRenderer>().color = Color.green;

            if (answerPlace.GetComponent <SpriteRenderer>().color == questionColor)
            {
                UIController gameController = GameObject.FindGameObjectWithTag("UIController").GetComponent <UIController>();

                gameController.StopTimer();

                gameController.ShowButton();
            }
        }
    }