private void StartQuestion() { // Fill in UI Title.text = _currentQuestion.Title; Description.text = _currentQuestion.Description; // Clear parking lot and repopulate iff it is needed if (!OperationQueue.GetArrayState().SequenceEqual(_currentQuestion.InitialState)) { OperationQueue.QueueOperation(new QueuedArrayOperation(ArrayOperations.Reset)); // Add cars for (var i = 0; i < _currentQuestion.InitialState.Count; i++) { // Work around issue with trying to insert VehicleType.empty if (!_currentQuestion.InitialState[i].Equals(VehicleType.empty)) { OperationQueue.QueueOperation(new QueuedArrayOperation(ArrayOperations.AddSpecific, i, _currentQuestion.InitialState[i])); } } } // Reset log OperationQueue.ResetLog(); GreenButton.gameObject.SetActive(true); GreenButton.GetComponentInChildren <Text>().text = "Check"; GreenButton.onClick.RemoveAllListeners(); GreenButton.onClick.AddListener(CheckQuestion); OrangeButton.gameObject.SetActive(true); OrangeButton.GetComponentInChildren <Text>().text = "Reset"; OrangeButton.onClick.RemoveAllListeners(); OrangeButton.onClick.AddListener(ResetQuestion); }
public void Start() { _operationQueue.ResetLog(); // Reset log so user doesn't have to aimlessly scroll NextStep(); }