예제 #1
0
    private void StageEnd(bool won)
    {
        // Play result sounds
        AudioManager.Instance.PlaySound(won ? Sounds.won : Sounds.lost);

        // Resetting canShoot parameter
        footballPlayer.animator.SetBool("canShoot", false);

        // Show win / lost text
        textAnimation.SetRoundOutcomeText(won);

        // Change current stage depending on round outcome
        gameController.currentStage = won ? gameController.currentStage + 1 : 0;

        // Reset ball position
        football.ResetPosition();

        // Ready next stage
        m_Action -= StageDefending;

        if (won)
        {
            gameController.stage = GameController.Stage.Idle;
        }
        else
        {
            InitLogoStage();
        }
    }