Example #1
0
        public void setRender()
        {
            Renderquality rq = Device.getRenderQualityLevle();


            if (rq == Renderquality.Low && _RenderInLowMode == false)
            {
                setScriptEnable(false);
                return;
            }
            if (rq == Renderquality.Normal && _RenderInNormalMode == false)
            {
                setScriptEnable(false);
                return;
            }
            if (rq == Renderquality.High && _RenderInHighMode == false)
            {
                setScriptEnable(false);
                return;
            }
            if (rq == Renderquality.VeryHigh && _RenderInVeryHighMode == false)
            {
                setScriptEnable(false);
                return;
            }


            if (GetComponent <ParticleSystem>() != null)
            {
                _orgParticleConfig._emissionRate = GetComponent <ParticleSystem>().emissionRate;
                _orgParticleConfig._maxParticles = GetComponent <ParticleSystem>().maxParticles;

                switch (rq)
                {
                case Renderquality.Low:
                    setParticle(_particleConfigInLowMode);
                    break;

                case Renderquality.Normal:
                    setParticle(_particleConfigInNormalMode);
                    break;

                case Renderquality.High:
                    setParticle(_particleConfigInHighMode);
                    break;

                case Renderquality.VeryHigh:
                    setParticle(_particleConfigInVeryHighMode);
                    break;
                }
            }
        }
Example #2
0
        public SystemConfig()
        {
            if (PlayerPrefs.HasKey("SoundSwich"))
            {
                soundSwich_ = PlayerPrefs.GetInt("SoundSwich") == 1 ? true : false;
                //AudioListener.volume = soundSwich_ ? 1 : 0;
            }
            else
            {
                PlayerPrefs.SetInt("SoundSwich", 1);
                soundSwich_ = true;
            }

            if (PlayerPrefs.HasKey("MusicSwich"))
            {
                musicSwith_ = PlayerPrefs.GetInt("MusicSwich") == 1 ? true : false;
            }
            else
            {
                PlayerPrefs.SetInt("MusicSwich", 1);
                musicSwith_ = true;
            }

            if (PlayerPrefs.HasKey("NetPlayerShowSwich"))
            {
                netPlayerShowSwith_ = PlayerPrefs.GetInt("NetPlayerShowSwich") == 1 ? true : false;
            }
            else
            {
                PlayerPrefs.SetInt("NetPlayerShowSwich", 1);
                netPlayerShowSwith_ = true;
            }

            if (PlayerPrefs.HasKey("Renderquality"))
            {
                renderquality_ = (Renderquality)PlayerPrefs.GetInt("Renderquality");
            }
        }