Пример #1
0
        public static void initSystemSetting()
        {
            bool flag = PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_SOUND);

            if (flag)
            {
                GlobleSetting.SOUND_ON = (PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_SOUND) > GlobleSetting.minSoundValue);
            }
            else
            {
                GlobleSetting.SOUND_ON = true;
            }
            MediaClient.getInstance().isPlaySound = GlobleSetting.SOUND_ON;
            bool flag2 = PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_MUSIC);

            if (flag2)
            {
                GlobleSetting.MUSIC_ON = (PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_MUSIC) > GlobleSetting.minMusicValue);
            }
            else
            {
                GlobleSetting.MUSIC_ON = true;
            }
            MediaClient.getInstance().isPlayMusic = GlobleSetting.MUSIC_ON;
            GlobleSetting.initSetting();
        }
Пример #2
0
 private static void initGameSetting()
 {
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.REFUSE_TEAM_INVITE))
     {
         REFUSE_TEAM_INVITE = PlayeLocalInfo.loadInt(PlayeLocalInfo.REFUSE_TEAM_INVITE) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_PRIVATE_INFO))
     {
         IGNORE_PRIVATE_INFO = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_PRIVATE_INFO) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_KNIGHTAGE_INVITE))
     {
         IGNORE_KNIGHTAGE_INVITE = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_KNIGHTAGE_INVITE) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_FRIEND_ADD_REMINDER))
     {
         IGNORE_FRIEND_ADD_REMINDER = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_FRIEND_ADD_REMINDER) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_EFFECT))
     {
         IGNORE_OTHER_EFFECT = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_EFFECT) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_PLAYER))
     {
         IGNORE_OTHER_PLAYER = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_PLAYER) == 1 ? true : false;
     }
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_PET))
     {
         IGNORE_OTHER_PET = PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_PET) == 1 ? true : false;
     }
 }
Пример #3
0
 public static void initLog()
 {
     if (PlayeLocalInfo.checkKey(PlayeLocalInfo.DEBUG_SHOW))
     {
         show_debug = PlayeLocalInfo.loadInt(PlayeLocalInfo.DEBUG_SHOW) == 1 ? true : false;
     }
     else
     {
         show_debug = true;
     }
 }
Пример #4
0
        private static void initGameSetting()
        {
            bool flag = PlayeLocalInfo.checkKey(PlayeLocalInfo.REFUSE_TEAM_INVITE);

            if (flag)
            {
                GlobleSetting.REFUSE_TEAM_INVITE = (PlayeLocalInfo.loadInt(PlayeLocalInfo.REFUSE_TEAM_INVITE) == 1);
            }
            bool flag2 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_PRIVATE_INFO);

            if (flag2)
            {
                GlobleSetting.IGNORE_PRIVATE_INFO = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_PRIVATE_INFO) == 1);
            }
            bool flag3 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_KNIGHTAGE_INVITE);

            if (flag3)
            {
                GlobleSetting.IGNORE_KNIGHTAGE_INVITE = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_KNIGHTAGE_INVITE) == 1);
            }
            bool flag4 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_FRIEND_ADD_REMINDER);

            if (flag4)
            {
                GlobleSetting.IGNORE_FRIEND_ADD_REMINDER = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_FRIEND_ADD_REMINDER) == 1);
            }
            bool flag5 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_EFFECT);

            if (flag5)
            {
                GlobleSetting.IGNORE_OTHER_EFFECT = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_EFFECT) == 1);
            }
            bool flag6 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_PLAYER);

            if (flag6)
            {
                GlobleSetting.IGNORE_OTHER_PLAYER = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_PLAYER) == 1);
            }
            bool flag7 = PlayeLocalInfo.checkKey(PlayeLocalInfo.IGNORE_OTHER_PET);

            if (flag7)
            {
                GlobleSetting.IGNORE_OTHER_PET = (PlayeLocalInfo.loadInt(PlayeLocalInfo.IGNORE_OTHER_PET) == 1);
            }
        }
Пример #5
0
        public void refresh()
        {
            bool active = this.goUpdate.active;

            if (active)
            {
                base.getGameObjectByPath("login").SetActive(true);
                base.getGameObjectByPath("login").transform.DOScale(0f, 0.3f).From <Tweener>();
            }
            else
            {
                base.getGameObjectByPath("login").SetActive(true);
            }
            this.btChoose.interactable = true;
            int  num  = 0;
            bool flag = PlayeLocalInfo.checkKey(PlayeLocalInfo.LOGIN_SERVER_SID);

            if (flag)
            {
                num = PlayeLocalInfo.loadInt(PlayeLocalInfo.LOGIN_SERVER_SID);
            }
            bool flag2 = num == 0;

            if (flag2)
            {
                bool flag3 = Globle.defServerId != 0;
                if (flag3)
                {
                    num = Globle.defServerId;
                }
                else
                {
                    bool flag4 = Globle.lServer.Count > 0;
                    if (flag4)
                    {
                        num = Globle.lServer[0].sid;
                    }
                }
            }
            this.setServer(num);
            this.serverChanged = false;
        }
Пример #6
0
        public void refresh()
        {
            if (goUpdate.active)
            {
                getGameObjectByPath("login").SetActive(true);
                getGameObjectByPath("login").transform.DOScale(0, 0.3f).From();
            }
            else
            {
                getGameObjectByPath("login").SetActive(true);
            }


            btChoose.interactable = true;
            int sid = 0;

            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.LOGIN_SERVER_SID))
            {
                sid = PlayeLocalInfo.loadInt(PlayeLocalInfo.LOGIN_SERVER_SID);
            }

            if (sid == 0)
            {
                //发送给服务器读取服务器缓存sid
                if (Globle.defServerId != 0)
                {
                    sid = Globle.defServerId;
                }
                else if (Globle.lServer.Count > 0)
                {
                    sid = Globle.lServer[0].sid;
                }
            }


            setServer(sid);
            serverChanged = false;
        }
Пример #7
0
        public override void onShowed()
        {
            //默认选中最新的记录
            List <ServerData> l = Globle.lServer;

            if (l.Count > 0)
            {
                changeArea((l.Count - 1) / 10);
            }

            int sid = 0;

            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.LOGIN_SERVER_SID))
            {
                sid = PlayeLocalInfo.loadInt(PlayeLocalInfo.LOGIN_SERVER_SID);
            }
            last_server.visiable = false;
            if (sid != 0 && Globle.dServer.ContainsKey(sid))
            {
                last_server.setData(Globle.dServer[sid]);
                last_server.visiable = true;
            }
        }
Пример #8
0
        public static void initSystemSetting()
        {
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_SOUND))
            {
                SOUND_ON = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_SOUND) > minSoundValue;
            }
            else
            {
                SOUND_ON = true;
            }
            MediaClient.instance.isPlaySound = SOUND_ON;

            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_MUSIC))
            {
                MUSIC_ON = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_MUSIC) > minMusicValue;
            }
            else
            {
                MUSIC_ON = true;
            }

            MediaClient.instance.isPlayMusic = MUSIC_ON;
            initSetting();
        }
Пример #9
0
        private static void initSystem()
        {
            //if (PlayeLocalInfo.checkKey(PlayeLocalInfo.VIDEO_QUALITY))
            //{
            //    SceneCamera.m_fScreenGQ_Level = float.Parse(PlayeLocalInfo.loadString(PlayeLocalInfo.VIDEO_QUALITY));
            //}

            //if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SCREEN_RESOLUTION))
            //{
            //    if (PlayeLocalInfo.loadInt(PlayeLocalInfo.SCREEN_RESOLUTION) != 0)
            //        SceneCamera.m_nScreenResolution_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.SCREEN_RESOLUTION);
            //}

            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.MODEL_DETAIL))
            {
                if (PlayeLocalInfo.loadInt(PlayeLocalInfo.MODEL_DETAIL) != 0)
                {
                    SceneCamera.m_nModelDetail_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.MODEL_DETAIL);
                }
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.FPS_LIMIT))
            {
                if (PlayeLocalInfo.loadInt(PlayeLocalInfo.FPS_LIMIT) != 0)
                {
                    SceneCamera.m_nFPSLimit_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.FPS_LIMIT);
                }
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.ROLE_SHADOW))
            {
                if (PlayeLocalInfo.loadInt(PlayeLocalInfo.ROLE_SHADOW) != 0)
                {
                    SceneCamera.m_nShadowAndLightGQ_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.ROLE_SHADOW);
                }
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SCENE_DETAIL))
            {
                if (PlayeLocalInfo.loadInt(PlayeLocalInfo.SCENE_DETAIL) != 0)
                {
                    SceneCamera.m_nSceneGQ_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.SCENE_DETAIL);
                }
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SKILL_EFFECT))
            {
                if (PlayeLocalInfo.loadInt(PlayeLocalInfo.SKILL_EFFECT) != 0)
                {
                    SceneCamera.m_nSkillEff_Level = PlayeLocalInfo.loadInt(PlayeLocalInfo.SKILL_EFFECT);
                }
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_SOUND))
            {
                int   soundValue = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_SOUND);
                float valuef     = (float)soundValue / 100.0f;
                MediaClient.instance.setSoundVolume(valuef);
            }
            else
            {
                MediaClient.instance.setSoundVolume(0.8f);//设置默认值
            }
            if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SYS_MUSIC))
            {
                int   musicValue = PlayeLocalInfo.loadInt(PlayeLocalInfo.SYS_MUSIC);
                float valuef     = (float)musicValue / 100.0f;
                MediaClient.instance.setMusicVolume(valuef);
            }
            else
            {
                MediaClient.instance.setMusicVolume(0.8f);//设置默认值
            }
            //if (PlayeLocalInfo.checkKey(PlayeLocalInfo.SCREEN_RESOLUTION))
            //{
            //    int skilleffValue = PlayeLocalInfo.loadInt(PlayeLocalInfo.SCREEN_RESOLUTION);
            //    SceneCamera.m_nSkillEff_Level = skilleffValue;
            //}
        }
Пример #10
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;
            }
        }