示例#1
0
        private IEnumerator LoadScene()
        {
            this.async = SceneManager.LoadSceneAsync("select_role_scene");
            yield return(this.async);

            bool flag = MediaClient.getInstance()._curMusicUrl != "audio/map/music/0";

            if (flag)
            {
                MediaClient.getInstance().PlayMusicUrl("audio/map/music/0", null, true);
                Application.DontDestroyOnLoad(GameObject.Find("Audio"));
            }
            yield break;
        }
示例#2
0
 public MediaClient()
 {
     MediaClient.instance = this;
     this.tick            = new TickItem(new Action <float>(this.onTick));
 }
示例#3
0
 protected override void onPlaySound(GameEvent e)
 {
     MediaClient.getInstance();
 }
示例#4
0
            private void initData()
            {
                this.scrbMusic.value          = MediaClient.getInstance().getMusicVolume();
                this.txtMusicValue.text       = ((int)(this.scrbMusic.value * 100f)).ToString();
                this.scrbMusicEffect.value    = MediaClient.getInstance().getSoundVolume();
                this.txtMusicEffectValue.text = ((int)(this.scrbMusicEffect.value * 100f)).ToString();
                int num             = (int)(SceneCamera.m_fScreenGQ_Level * 10f);
                int nLightGQ_Level  = SceneCamera.m_nLightGQ_Level;
                int nShadowGQ_Level = SceneCamera.m_nShadowGQ_Level;
                int nSceneGQ_Level  = SceneCamera.m_nSceneGQ_Level;
                int nSkillEff_Level = SceneCamera.m_nSkillEff_Level;
                int num2            = num;

                if (num2 != 0)
                {
                    if (num2 != 5)
                    {
                        if (num2 == 10)
                        {
                            this.videoQualityValueToggles[2].isOn = true;
                        }
                    }
                    else
                    {
                        this.videoQualityValueToggles[1].isOn = true;
                    }
                }
                else
                {
                    this.videoQualityValueToggles[0].isOn = true;
                }
                for (int i = 1; i <= this.tfShadowVolumeToggles.childCount; i++)
                {
                    bool flag = nLightGQ_Level == i;
                    if (flag)
                    {
                        this.tfShadowVolumeToggles.GetChild(i - 1).GetComponent <Toggle>().isOn = true;
                    }
                    else
                    {
                        this.tfShadowVolumeToggles.GetChild(i - 1).GetComponent <Toggle>().isOn = false;
                    }
                }
                for (int j = 1; j <= this.tfRoleShadowToggles.childCount; j++)
                {
                    bool flag2 = nShadowGQ_Level == j;
                    if (flag2)
                    {
                        this.tfRoleShadowToggles.GetChild(j - 1).GetComponent <Toggle>().isOn = true;
                    }
                    else
                    {
                        this.tfRoleShadowToggles.GetChild(j - 1).GetComponent <Toggle>().isOn = false;
                    }
                }
                for (int k = 1; k <= this.tfSceneDetailToggles.childCount; k++)
                {
                    bool flag3 = nSceneGQ_Level == k;
                    if (flag3)
                    {
                        this.tfSceneDetailToggles.GetChild(k - 1).GetComponent <Toggle>().isOn = true;
                    }
                    else
                    {
                        this.tfSceneDetailToggles.GetChild(k - 1).GetComponent <Toggle>().isOn = false;
                    }
                }
                for (int l = 1; l <= this.tfSkillEffectToggles.childCount; l++)
                {
                    bool flag4 = nSkillEff_Level == l;
                    if (flag4)
                    {
                        this.tfSkillEffectToggles.GetChild(l - 1).GetComponent <Toggle>().isOn = true;
                    }
                    else
                    {
                        this.tfSkillEffectToggles.GetChild(l - 1).GetComponent <Toggle>().isOn = false;
                    }
                }
            }
 public MediaClient()
     : base()
 {
     instance = this;
 }
示例#6
0
        private static void initSystem()
        {
            bool flag = PlayeLocalInfo.checkKey(PlayeLocalInfo.VIDEO_QUALITY);

            if (flag)
            {
                SceneCamera.m_fScreenGQ_Level = float.Parse(PlayeLocalInfo.loadString(PlayeLocalInfo.VIDEO_QUALITY));
            }
            bool flag2 = PlayeLocalInfo.checkKey(PlayeLocalInfo.DYNAM_LIGHT);

            if (flag2)
            {
                bool flag3 = PlayeLocalInfo.loadInt(PlayeLocalInfo.DYNAM_LIGHT) != 0;
                if (flag3)
                {
                    SceneCamera.m_nLightGQ_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.DYNAM_LIGHT);
                }
            }
            bool flag4 = PlayeLocalInfo.checkKey(PlayeLocalInfo.ROLE_SHADOW);

            if (flag4)
            {
                bool flag5 = PlayeLocalInfo.loadInt(PlayeLocalInfo.ROLE_SHADOW) != 0;
                if (flag5)
                {
                    SceneCamera.m_nShadowGQ_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.ROLE_SHADOW);
                }
            }
            bool flag6 = PlayeLocalInfo.checkKey(PlayeLocalInfo.SCENE_DETAIL);

            if (flag6)
            {
                bool flag7 = PlayeLocalInfo.loadInt(PlayeLocalInfo.SCENE_DETAIL) != 0;
                if (flag7)
                {
                    SceneCamera.m_nSceneGQ_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.SCENE_DETAIL);
                }
            }
            bool flag8 = PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_SOUND);

            if (flag8)
            {
                int   num         = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_SOUND);
                float soundVolume = (float)num / 100f;
                MediaClient.getInstance().setSoundVolume(soundVolume);
            }
            else
            {
                MediaClient.getInstance().setSoundVolume(0.8f);
            }
            bool flag9 = PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_MUSIC);

            if (flag9)
            {
                int   num2        = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_MUSIC);
                float musicVolume = (float)num2 / 100f;
                MediaClient.getInstance().setMusicVolume(musicVolume);
            }
            else
            {
                MediaClient.getInstance().setMusicVolume(0.8f);
            }
            bool flag10 = PlayeLocalInfo.checkKey(PlayeLocalInfo.SKILL_EFFECT);

            if (flag10)
            {
                int nSkillEff_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.SKILL_EFFECT);
                SceneCamera.m_nSkillEff_Level = nSkillEff_Level;
            }
        }