private void Update() { if (main == null) { main = StateMachine.Instance.FindState <MainState>(); } //Find the dynamic camera if (dynamicCamera == null) { dynamicCamera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>(); } //When the current sensor is ready to be configured, call its UpdateTransformFunction and update its angle, range & node text in the corresponding panels if (currentSensor != null && currentSensor.IsChangingPosition) { currentSensor.UpdateTransform(); UpdateSensorAnglePanel(); UpdateSensorRangePanel(); } showSensorButton.SetActive(sensorManager.GetActiveSensors().Count > 0 && isHidingOutput); //Allows users to save their configuration using enter if (isEditingAngle && Input.GetKeyDown(KeyCode.Return)) { ToggleEditAngle(); } if (isEditingRange && Input.GetKeyDown(KeyCode.Return)) { ToggleEditRange(); } }
private void Update() { //Find the dynamic camera if (dynamicCamera == null) { dynamicCamera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>(); } //When the current sensor is ready to be configured, call its UpdateTransformFunction and update its angle, range & node text in the corresponding panels if (currentSensor != null && currentSensor.IsChangingPosition) { currentSensor.UpdateTransform(); sensorNodeText.text = "Current Node: " + currentSensor.transform.parent.gameObject.name; UpdateSensorAnglePanel(); UpdateSensorRangePanel(); } }
private void Update() { if (main == null) { main = GameObject.Find("StateMachine").GetComponent <StateMachine>().CurrentState as MainState; } //Find the dynamic camera if (dynamicCamera == null) { dynamicCamera = GameObject.Find("Main Camera").GetComponent <DynamicCamera>(); } //When the current sensor is ready to be configured, call its UpdateTransformFunction and update its angle, range & node text in the corresponding panels if (currentSensor != null && currentSensor.IsChangingPosition) { currentSensor.UpdateTransform(); UpdateSensorAnglePanel(); UpdateSensorRangePanel(); } showSensorButton.SetActive(sensorManager.GetActiveSensors().Count > 0 && isHidingOutput); }