コード例 #1
0
 // Add bowl to list of bowls and display score of the bowl
 private void ScoreBowl(int pinsKnockedDown)
 {
     // Add bowl to list and display scores in Score Card
     bowls.Add(pinsKnockedDown);
     try { scoreDisplay.FillRollCard(bowls); }
     catch { Debug.Log("FillRollCard Failed!"); }
 }
コード例 #2
0
ファイル: GameManager.cs プロジェクト: jelzGames/Bowling
    public void Bowl(int pinFall)
    {
        rolls.Add(pinFall);
        ball.Reset();
        pinSetter.perfomanceAction(ActionMaster.NextAction(rolls));

        scoreDisplay.FillRollCard(rolls);
        scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
    }
コード例 #3
0
ファイル: GameManager.cs プロジェクト: Lkleven/Boneyard-Bowl
 void UpdateScore(List <int> bowls)
 {
     try{
         scoreDisplay.FillRollCard(bowls);
         scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(bowls));
     }catch {
         Debug.LogWarning("FillRollCard() error");
     }
 }
コード例 #4
0
    public void Bowl(int pinFall)
    {
        bowls.Add(pinFall);
        ball.Reset();

        ActionMaster.Action nextAction = ActionMaster.NextAction(bowls);
        pinSetter.PerformAction(nextAction);

        scoreDisplay.FillRollCard(bowls);
    }
コード例 #5
0
    public void Bowl(int pinFall)
    {
        // Add current pin fall cout to history of bowls.
        bowls.Add(pinFall);
        // Perform next action based on the current and previous bowl counts.
        pinSetter.PerformAction(ActionMaster.NextAction(bowls));
        // Update score dispaly.
        scoreDisplay.FillRollCard(bowls);
        scoreDisplay.FillFreames(ScoreMaster.ScoreCumulative(bowls));

        ball.Reset();
    }
コード例 #6
0
 public void Bowl(int pinFall)
 {
     rolls.Add(pinFall);
     ActionMaster.Action nextAction = ActionMaster.NextAction(rolls);
     if (nextAction == ActionMaster.Action.EndGame)
     {
         levelManager.LoadNextLevel();
     }
     pinSetter.Animation(nextAction);
     scoreDisplay.FillRollCard(rolls);
     scoreDisplay.FillScores(ScoreMaster.ScoreCumulative(rolls));
     ball.BallReset();
 }
コード例 #7
0
    public void Bowl(int pinFall)
    {
        ball.Reset();

        rolls.Add(pinFall);
        pinSetter.PerformAction(ActionMaster.NextAction(rolls));
        //Debug.Log("roll 0 = " + rolls[0] + " roll 1 should exist but = " + rolls[1]);
        //do get strike if move these up but then over written
        //so bowling not knacker score after game finish
        //would prefer endgame to just disable the script but doesnt seem to work maybe because its a static
        //if (ScoreMaster.ScoreFrames(rolls).Count < 11) {}
        scoreDisplay.FillRollCard(rolls);
        scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
    }
コード例 #8
0
    public void Bowl(int pinFall)
    {
        try {
            bowls.Add(pinFall);
            ball.Reset();
            pinSetter.PerformAction(ActionMaster.NextAction(bowls));
        } catch
        {
            Debug.LogWarning("Something went wrong in Bowl()");
        }


        scoreDisplay.FillRollCard(bowls);
    }
コード例 #9
0
    public void Bowl(int pinFall)
    {
        rolls.Add(pinFall);
        pinSetter.PerformAction(ActionMasterOld.NextAction(rolls));
        ball.Reset();

        try {
            scoreDisplay.FillRollCard(rolls);
            scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
        }
        catch
        {
            Debug.LogWarning("Error while filling scoreboard.");
        }
    }
コード例 #10
0
ファイル: GameManager.cs プロジェクト: Zikuszymek/Unity_P_4
    public void Bowl(int pinFalls)
    {
        bowls.Add(pinFalls);
        ScoreMaster.Action nextAction = ScoreMaster.NextAction(bowls);
        pinSetter.performAction(nextAction);

        try
        {
            scoreDisplay.FillRollCard(bowls);
            scoreDisplay.FillFrames(ActionMaster.ScoreCumulatiove(bowls));
        } catch
        {
            Debug.LogWarning("Error help, pls");
        }
        ball.Reset();
    }
コード例 #11
0
    public void Bowl(int pinFalls)
    {
        try{
            rolls.Add(pinFalls);
            ball.Reset();
            pinSetter.PerformAction(ActionMasterOldCopy.NextAction(rolls));
        } catch {
            Debug.LogWarning("Something went wrong in BOWL()");
        }

        try{
            scoreDisplay.FillRollCard(rolls);
            scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
        } catch {
            Debug.LogWarning("Something went wrong in ScoreDisplay.FillRollCard");
        }
    }
コード例 #12
0
ファイル: GameManager.cs プロジェクト: modv93/BowlMaster
 // Update is called once per frame
 public void Bowls(int pinFall)
 {
     try{
         rolls.Add(pinFall);
         ball.Reset();
         ActionMaster.Action nextAction = ActionMaster.NextAction(rolls);
         pinSetter.PerformAction(nextAction);
     }catch {
         Debug.Log("There is some problem in performing action");
     }
     try{
         scoreDisplay.FillRollCard(rolls);
         scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(rolls));
     }
     catch {
         Debug.Log("There's an error while fiiling the score card");
     }
 }
コード例 #13
0
    public void Bowl(int pinFall)
    {
        try
        {
            pins.Add(pinFall);
            ball.Reset();
            pinSetter.PerformAction(ActionMaster.NextAction(pins));
        }
        catch
        {
            Debug.LogWarning("Something went wrong with Bowl()");
        }

        try
        {
            scores.FillRollCard(pins);
            scores.FillFrames(ScoreMaster.ScoreCumulative(pins));
        }
        catch { Debug.LogWarning("Something went wrong with FillRollCard()"); }
    }
コード例 #14
0
 public void Bowl(int pinFall)
 {
     try
     {
         bowls.Add(pinFall);
         ball.Reset();
         pinSetter.PreformAction(ActionMaster.NextAction(bowls));
     }
     catch
     {
         Debug.LogWarning("Something when wrong in Game Manager Bowl()");
     }
     try
     {
         scoreDisplay.FillRollCard(bowls);
         scoreDisplay.FillFrames(ScoreMaster.ScoreCumulative(bowls));
     }
     catch
     {
         Debug.LogWarning("fill roll card failed ");
     }
 }