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");
        }
    }
Ejemplo n.º 2
0
    /// <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);
    }
Ejemplo n.º 3
0
    /// <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);
    }
Ejemplo n.º 4
0
 public void LeverValueChange(VRLever _lever)
 {
     CurrentPiston.Value = _lever.Value;
 }
Ejemplo n.º 5
0
 public void LeverValueChange(VRLever _lever, float _newValue, float _oldValue)
 {
     CurrentPiston.Value = _newValue;
 }
Ejemplo n.º 6
0
 public void SetIntensity(VRLever lever, float value, float valuecache)
 {
     l.intensity = value;
 }