Beispiel #1
0
    void OnGUI()
    {
        Debug.Log("OnGUI");
        //GUI.skin = guiSkin;
        GUI.Label(new Rect(Screen.width / 2, 0, Screen.width, Screen.height / 4), s);


        if (GUI.Button(new Rect(0, 0, 100, 50), "LoadCsv"))
        {
            StartCoroutine(StreamingAssetPathConfigReader.TextReader("config.csv", ShowCsv));
        }
        if (GUI.Button(new Rect(0, 50, 100, 50), "LoadTxt"))
        {
            StartCoroutine(StreamingAssetPathConfigReader.TextReader("Test.txt", ShowTxt));
        }
        if (GUI.Button(new Rect(0, 100, 100, 50), "LoadJson"))
        {
            StartCoroutine(StreamingAssetPathConfigReader.TextReader("Test2.json", ShowJson));
        }

        if (GUI.Button(new Rect(0, 150, 100, 50), "ShowImage"))
        {
            StartCoroutine(StreamingAssetPathConfigReader.TextureReader("Picture.png", ShowTexture));
        }

        if (GUI.Button(new Rect(0, 200, 100, 50), "PlayerAudio"))
        {
            StartCoroutine(StreamingAssetPathConfigReader.AudioClipReader("audio.wav", AudioPlay));
        }
    }
        public override void AddExam()
        {
            switch (readMode)
            {
            case ReadMode.json:
                StartCoroutine(StreamingAssetPathConfigReader.TextReader(path + ".json", (a) =>
                {
                    ExamMgr.ExamDatas = new ExamReadByJson().LoadExam(a);
                }));
                break;

            case ReadMode.csv:
                break;

            case ReadMode.txt:
                break;
            }
        }