Exemplo n.º 1
0
    // Show this HUD layer
    public void show()
    {
        string stageTextAddition = string.Empty;

        stageTextAddition = StageSystemManager.isOnFinalStage() == true ? " (final)" : string.Empty;

        stageText.text = "Stage " + StageSystemManager.getCurrentStage().ToString() + stageTextAddition;

        animComp.SetBool("isShowing", true);
        animComp.SetBool("isHiding", false);
    }
Exemplo n.º 2
0
    // When this HUD layer is shown
    public void show()
    {
        Cursor.visible   = true;
        tooltipText.text = string.Empty;

        continueButton.onClick.AddListener(delegate
        {
            // If the player is not on the last stage
            // Increase the stage count
            if (StageSystemManager.isOnFinalStage() == false)
            {
                StageSystemManager.setCurrentStage(StageSystemManager.getCurrentStage() + 1);
            }
            musicPlayer.fadeOut();
            StartCoroutine(reloadLevel());
        });

        quitButton.onClick.AddListener(delegate
        {
            musicPlayer.fadeOut();
            StartCoroutine(goToMainMenu());
        });

        // Set the content of the title based on whether the player
        // reached the score target
        if (player.getBounceCount() >= ScoreTargetController.getScoreTarget())
        {
            titleText.text = "You Win";
        }

        else
        {
            titleText.text = "You Lose";
        }

        scoreGoalText.text          = ScoreTargetController.getScoreTarget().ToString();
        playerBounceResultText.text = player.getBounceCount().ToString();

        animComp.SetBool("isShowing", true);
        animComp.SetBool("isHiding", false);
    }