Beispiel #1
0
    private void Update()
    {
        ControlModeManager.CONTROL_MODE curMode = m_ControlModeManager.GetCurrentControlMode();
        switch (curMode)
        {
        case ControlModeManager.CONTROL_MODE.QUERY_MODEL:
            LeftQuery.Activate();
            RightQuery.Activate();
            LeftModel.Activate();
            RightModel.Activate();
            break;

        case ControlModeManager.CONTROL_MODE.QUERY_BOX:
            LeftQuery.Activate();
            RightQuery.Activate();
            LeftBox.Activate();
            RightBox.Activate();
            break;

        case ControlModeManager.CONTROL_MODE.MESSAGE_MODEL:
            LeftModel.Activate();
            RightModel.Activate();
            LeftMessage.Activate();
            RightMessage.Activate();
            break;

        case ControlModeManager.CONTROL_MODE.MESSAGE_BOX:
            LeftMessage.Activate();
            RightMessage.Activate();
            LeftBox.Activate();
            RightBox.Activate();
            break;

        case ControlModeManager.CONTROL_MODE.CONNECTIVITY_MODEL:
            LeftConnectivity.Activate();
            RightConnectivity.Activate();
            LeftModel.Activate();
            RightModel.Activate();
            break;

        case ControlModeManager.CONTROL_MODE.CONNECTIVITY_BOX:
            LeftConnectivity.Activate();
            RightConnectivity.Activate();
            LeftBox.Activate();
            RightBox.Activate();
            break;
        }

        if (LeftOptionsMenu.activeInHierarchy || RightOptionsMenu.activeInHierarchy)
        {
            int messageLen = m_FullLineModelRenderer.m_steps - 7;
            LeftMessageLength.SetPosition((float)-messageLen);
            RightMessageLength.SetPosition((float)-messageLen);

            int messageSpeed = m_FullLineModelRenderer.m_iterationDelay - 6;
            LeftMessageSpeed.SetPosition((float)messageSpeed);
            RightMessageSpeed.SetPosition((float)messageSpeed);

            float rangeVal  = Mathf.Log((m_FullLineModelRenderer.m_connectionRange - a) / b) / c;
            float sliderVal = -(rangeVal * 10) + 5;
            LeftConnectionRange.SetPosition(sliderVal);
        }
    }