示例#1
0
    private void SetStateHelper(EVRSuitManager.ConnectionState currentState)
    {
        switch (currentState)
        {
        case EVRSuitManager.ConnectionState.NONE:
            GetComponent <Selectable>().interactable = None; break;

        case EVRSuitManager.ConnectionState.ATTACHED:
            GetComponent <Selectable>().interactable = Attached; break;

        case EVRSuitManager.ConnectionState.DETACHED:
            GetComponent <Selectable>().interactable = Detached; break;

        case EVRSuitManager.ConnectionState.CONNECTED:
            GetComponent <Selectable>().interactable = Conected; break;

        case EVRSuitManager.ConnectionState.DISCONNECTED:
            GetComponent <Selectable>().interactable = Disconnected; break;

        case EVRSuitManager.ConnectionState.CALIBRATING:
            GetComponent <Selectable>().interactable = Calibrating; break;

        case EVRSuitManager.ConnectionState.STREAMING:
            GetComponent <Selectable>().interactable = Streaming; break;
        }
    }
示例#2
0
    private System.Collections.IEnumerator DelayAndSetState(EVRSuitManager.ConnectionState currentState)
    {
        yield return(new WaitForSeconds(3));

        SetStateHelper(currentState);
    }
示例#3
0
 public void SetState(EVRSuitManager.ConnectionState currentState)
 {
     // Implement an artificial delay
     GetComponent <Selectable>().interactable = false;
     StartCoroutine(DelayAndSetState(currentState));
 }