Exemplo n.º 1
0
    public void CanvasShow()
    {
        if (showmovie)          // show video UI
        {
            conclusion.SetActive(false);
            judgeData.SetActive(false);
            videoShow.SetActive(true);
            switch (level)
            {
            case 1:
                ReSetCanvas();
                GameObject.Find("Title").GetComponent <Text> ().text            = "应急门指示教学";
                GameObject.Find("VideoShow").GetComponent <RawImage> ().texture = movies [0];
                GameObject.Find("VideoShow").GetComponent <AudioSource> ().clip = clips [0];
                break;

            case 2:
                ReSetCanvas();
                GameObject.Find("Title").GetComponent <Text> ().text            = "氧气面罩使用教学";
                GameObject.Find("VideoShow").GetComponent <RawImage>().texture  = movies[1];
                GameObject.Find("VideoShow").GetComponent <AudioSource> ().clip = clips [1];
                break;
            }
        }
        else            //show evaluate UI
        {
            conclusion.SetActive(false);
            videoShow.SetActive(false);
            judgeData.SetActive(true);
            switch (level)
            {
            case 1:
                GameObject.Find("Title").GetComponent <Text> ().text = "展示应急通道";
                controller.LoadPointer();
                break;

            case 2:
                GameObject.Find("Title").GetComponent <Text> ().text = "氧气面罩的使用方法P1";
                controller.LoadHelmetP1();
                break;
            }
            HideButton();
        }
        timer = Time.deltaTime;
        StartCoroutine("Show");
    }