Ejemplo n.º 1
0
    public void Bowl(int pinFall)
    {
        rolls.Add(pinFall);
        ball.Reset();

        ActionMaster.Action nextAction = ActionMaster.NextAction(rolls);
        pinSetter.TakeAction(nextAction);

        scoreDisplay.FillRolls(rolls);
        scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));

        if (ScoreMaster.ScoreCumulative(rolls).Count >= 10)
        {
            gameOver = true;
            touchPanel.SetActive(false);
            resetPanel.gameObject.SetActive(true);
            resetPanel.SetFinalScore(ScoreMaster.ScoreCumulative(rolls)[9]);
        }
    }