Ejemplo n.º 1
0
    public void LoadProcedure(int index)
    {
        if (index < 0 || index >= procedureCount)
        {
            return;
        }

        //stop current or deal with start message
        if (currentProc != null && currentProc.Running)
        {
            //stop procedure
            currentProc.Stop();
        }
        else
        {
            if (procIndex + 1 >= 0 && procIndex + 1 < startSequences.Count)
            {
                startSequences[procIndex + 1].Finish();
            }
        }

        //ensure we disable start screen
        startScreen.SetActive(false);

        //prepare vars for new proc
        procIndex   = index - 1;
        currentProc = null;

        ShowStartMessage();
    }