Пример #1
0
 void Start()
 {
     m_OutputErrorData = FindObjectOfType <OutputErrorData>();
     //StartCoroutine(RunStartWWW());
     InvokeRepeating("UpdateSystemData", 1, 5);
     InvokeRepeating("UpdateSystemSwitchData", 2, 3);
 }
Пример #2
0
    // For testing
    //public GameObject cube;

    void Start()
    {
        S = this;
        //add procedure voice commands
        for (int i = 0; i < allProcedures.Count; i++)
        {
            string s = allProcedures[i].procedure_title.Split(':')[0];
            VoiceManager.S.addProcedureCommand("Adele " + s + " Procedure", i, 0);
        }

        //add task voice commands
        for (int i = 0; i < allProcedures.Count; i++)
        {
            for (int j = 0; j < allProcedures[i].Tasks.Length; j++)
            {
                string s = allProcedures[i].Tasks[j].Title.Split(':')[0];
                VoiceManager.S.addProcedureCommand("Adele " + s + " Task", i, j);
            }
        }

        m_OutputErrorData = FindObjectOfType <OutputErrorData>();
        InvokeRepeating("UpdateSystemData", 1, 5);
    }
Пример #3
0
    private void CheckSuitSwitches(SuitDataSwitch ndts)
    {
        if (m_OutputErrorData == null)
        {
            m_OutputErrorData = FindObjectOfType <OutputErrorData>();
        }

        Debug.Log("Output Error Data" + m_OutputErrorData.gameObject.transform);

        m_OutputErrorData.ClearText();

        if (ndts == null)
        {
            //m_OutputErrorData.OutputErrorText("No Connection to Server");
            return;
        }

        if (ndts.h2o_off == "true")
        {
            m_OutputErrorData.OutputErrorText("H2O IS OFF");
        }
        if (ndts.sspe == "true")
        {
            m_OutputErrorData.OutputErrorText("SUIT P EMERG");
        }
        if (ndts.fan_error == "true")
        {
            m_OutputErrorData.OutputErrorText("FAN SW OFF");
        }
        if (ndts.vent_error == "true")
        {
            m_OutputErrorData.OutputErrorText("NO VENT FLOW");                            // Add vent rpms
        }
        if (ndts.vehicle_power == "true")
        {
            m_OutputErrorData.OutputErrorText("VEHICLE POWER AVAIL");
        }
        if (ndts.o2_off == "true")
        {
            m_OutputErrorData.OutputErrorText("O2 IS OFF");
        }
        if (ndts.sop_on == "true")
        {
            m_OutputErrorData.OutputErrorText("SECONDARY OXYGEN TANK ON");
        }

        if (m_SwitchUIElements.Length <= 0)
        {
            return;
        }

        //Debug.Log(ndts.sop_on);

        m_SwitchUIElements[0].SetActive(GetSwitchState(ndts.h2o_off));
        m_SwitchUIElements[1].SetActive(GetSwitchState(ndts.sspe));
        m_SwitchUIElements[2].SetActive(GetSwitchState(ndts.fan_error));
        m_SwitchUIElements[3].SetActive(GetSwitchState(ndts.vent_error));
        m_SwitchUIElements[4].SetActive(GetSwitchState(ndts.vehicle_power));
        m_SwitchUIElements[5].SetActive(GetSwitchState(ndts.o2_off));
        m_SwitchUIElements[6].SetActive(GetSwitchState(ndts.sop_on));
        m_SwitchUIElements[7].SetActive(GetSwitchState(ndts.battery_amp_high));
        m_SwitchUIElements[8].SetActive(GetSwitchState(ndts.battery_vdc_low));
        m_SwitchUIElements[9].SetActive(GetSwitchState(ndts.suit_pressure_low));
        m_SwitchUIElements[10].SetActive(GetSwitchState(ndts.suit_pressure_high));
        m_SwitchUIElements[11].SetActive(GetSwitchState(ndts.o2_use_high));
        m_SwitchUIElements[12].SetActive(GetSwitchState(ndts.sop_pressure_low));
        m_SwitchUIElements[13].SetActive(GetSwitchState(ndts.co2_high));
    }