Beispiel #1
0
    // Use this for initialization
    void Awake()
    {
        ControlScript = CS.GetComponent <ChangeControl>();
        Slider_tep    = Slider.GetComponent <Slider>();
        Audio_tep     = obj_canvas.GetComponent <AudioSource>();

        btn_back.onClick.AddListener(onClickBackButton);
        tg.isOn = m_config.GetFrame();

        tg_window.isOn = m_config.GetWindowed();
        if (tg_window.isOn)
        {
            Screen.SetResolution(1366, 768, true);
        }
        else
        {
            Screen.SetResolution(1366, 768, false);
        }
        fSlider_value    = m_config.f_GetBGMval();/*BGM音量0~1*/
        Slider_tep.value = fSlider_value;
        Audio_tep.volume = fSlider_value;
        int d = (int)m_config.Quality_GetQuality();/* 画质 */

        QualitySettings.SetQualityLevel(d);
        switch (d)
        {
        case 0: tex_Quality.text = "低"; break;

        case 2: tex_Quality.text = "中"; break;

        case 4: tex_Quality.text = "高"; break;

        case 5: tex_Quality.text = "最高"; break;

        default: break;
        }

        fScro_value        = m_config.f_GetQualityPos();/* 画质滑块位置0~1 */
        Scro_Quality.value = fScro_value;
    }