/// <summary> /// Called when the Start/Stop button is clicked. /// </summary> public void StartStopButtonClicked() { if (StartStopButtonFunctionality == StartStopFunctionality.StartFunctionality) { stepGenerator.StartSteps(); StartStopButtonFunctionality = StartStopFunctionality.StopFuntionality; } else { stepGenerator.HaltSteps(); StartStopButtonFunctionality = StartStopFunctionality.StartFunctionality; } }
/// <summary> /// Starts the project, if the parameters command it to. /// </summary> void Start() { // Handle the auto run param. bool autoRun = projectParamSet.BoolParam(ParamSet.ParamGroupSetupManager, ParamSet.ParamAutoRun); if (autoRun) { GameObject.FindObjectOfType <RunManager>().StartStopButtonFunctionality = RunManager.StartStopFunctionality.StopFuntionality; GameObject stepGenGameObject = GameObject.FindGameObjectWithTag("StepGenerator"); StepGenerator stepGen = stepGenGameObject.GetComponent <StepGenerator>(); stepGen.StartSteps(); } else { GameObject.FindObjectOfType <RunManager>().StartStopButtonFunctionality = RunManager.StartStopFunctionality.StartFunctionality; } }