Esempio n. 1
0
    IEnumerator _reset_co()
    {
        Debug.Log("RESET!");

        if (m_netcomm != null)
        {
            m_netcomm.Terminate();
            while (!m_netcomm.IsEnd())
            {
                yield return(null);
            }
            m_netcomm = null;
        }

        m_bReqAbort = true;

        while (!m_bEnd)
        {
            yield return(null);
        }

        SceneManager.LoadScene("remotereset");
    }
Esempio n. 2
0
    IEnumerator _start_co()
    {
        m_start_done = false;

        m_bReqAbort  = false;
        m_abort_done = false;

        m_netcomm = new netcomm(m_runmode);
        m_netcomm.Start();

        slagremote.cmd.init();

        m_start_done = true; //スタート完了通知

        yield return(null);

        if (m_runmode == RUNMODE.NORMAL)
        {
            guiDisplay.WriteLine("slag monitor からコマンドを入力して下さい。" + System.Environment.NewLine);
        }

        while (true)
        {
            if (m_bReqAbort)
            {
                break;
            }

            yield return(null);

            if (m_bReqAbort)
            {
                break;
            }

            var cmd = slagremote.cmd.GetNextCmd();
            if (cmd == null)
            {
                cmd = m_netcomm.GetCmd();
            }

            if (cmd == null)
            {
                continue;
            }
            slagremote.cmd.execute(cmd);
        }
        m_bReqAbort = false;

        if (m_netcomm != null)
        {
            m_netcomm.Terminate();
            while (!m_netcomm.IsEnd())
            {
                yield return(null);
            }
            m_netcomm = null;
        }
        m_abort_done = true;
        m_start_done = false;
    }