private void Awake() { lastMessage = new Message_ExtLight(false, false, false, networkUID); strobeLight = GetComponentInChildren <StrobeLightController>(); VRInteractable navObject = FindInteractableWithName("Navigation Lights"); if (navObject == null) { navObject = FindInteractableWithName("Nav Lights"); } VRInteractable landingObject = FindInteractableWithName("Landing Lights"); if (navObject != null) { navLever = navObject.gameObject.GetComponent <VRLever>(); Debug.Log("Got navlight lever"); } else { Debug.Log("Could not get navlight lever"); } if (landingObject != null) { landingLever = landingObject.gameObject.GetComponent <VRLever>(); Debug.Log("Got landing lever"); } else { Debug.Log("Could not get landing lever"); } }
/// <summary> /// Changes the light intensity, called by the lever /// </summary> /// <param name="_lever">Lever.</param> public void IntensityChanged(VRLever _lever) { if (_lever == null) { Debug.LogError("_lever is null"); return; } SetIntensity(_lever.Value); }
/// <summary> /// Changes the light intensity, called by the lever /// </summary> /// <param name="_lever">Lever.</param> public void IntensityChanged(VRLever _lever, float _currentValue, float _lastValue) { SetIntensity(_currentValue); }
public void LeverValueChange(VRLever _lever) { CurrentPiston.Value = _lever.Value; }
public void LeverValueChange(VRLever _lever, float _newValue, float _oldValue) { CurrentPiston.Value = _newValue; }
public void SetIntensity(VRLever lever, float value, float valuecache) { l.intensity = value; }