/// <summary> /// Performs the tasks required by the specified action. /// </summary> /// <param name="nextAction">The next action to perform in the game.</param> private void PerformAction(ActionMaster.Action nextAction) { switch (nextAction) { case ActionMaster.Action.Tidy: pinSetter.TidyPins(); break; case ActionMaster.Action.Reset: case ActionMaster.Action.EndTurn: pinSetter.ResetPins(); break; case ActionMaster.Action.EndGame: popupController.ShowGameEndPanel(); gameComplete = true; break; default: throw new UnityException("No specified behaviour for action: " + nextAction); } }