public static Action NextAction(List <int> pinFalls) { ActionMasterOldCopy am = new ActionMasterOldCopy(); Action currentAction = new Action(); foreach (int pinFall in pinFalls) { currentAction = am.Bowl(pinFall); } return(currentAction); }
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"); } }