Пример #1
0
        /// <summary>
        /// Khởi tạo thông tin cài đặt
        /// </summary>
        public void Init()
        {
            Platform = new PlatformSetting();

            if (StoreGame.Contains(StoreGame.EType.FULL_SCREEN))
            {
                IsFullScreen = StoreGame.LoadInt(StoreGame.EType.FULL_SCREEN) == (int)StoreGame.EToggle.ON;
            }
            if (StoreGame.Contains(StoreGame.EType.LOCK_SCREEN))
            {
                AllowLockScreen = StoreGame.LoadInt(StoreGame.EType.LOCK_SCREEN) == (int)StoreGame.EToggle.ON;
            }
        }
Пример #2
0
    void Start()
    {
        //disable checkbox full screen on mobile
#if UNITY_IPHONE || UNITY_ANDROID || UNITY_WP8 || UNITY_BLACKBERRY
        cbFullScreen.GetComponent <BoxCollider>().enabled      = false;
        cbFullScreen.GetComponentInChildren <UISprite>().color = new Color(1f, 1f, 1f, 90 / 255f);
#endif
        //chưa có âm thanh nền nên không cho người chơi tương tác
        cbSoundBackground.GetComponent <BoxCollider>().enabled      = false;
        cbSoundBackground.GetComponentInChildren <UISprite>().color = new Color(1f, 1f, 1f, 90 / 255f);

        cbSoundEffect.value     = StoreGame.LoadInt(StoreGame.EType.SOUND_EFFECT, (int)StoreGame.EToggle.ON) == (int)StoreGame.EToggle.ON;
        cbSoundBackground.value = StoreGame.LoadInt(StoreGame.EType.SOUND_BACKGROUND, (int)StoreGame.EToggle.ON) == (int)StoreGame.EToggle.ON;
        cbFullScreen.value      = GameManager.Setting.IsFullScreen;
        cbLockScreen.value      = GameManager.Setting.AllowLockScreen;
        wasStart = true;
    }
Пример #3
0
    public void Init()
    {
        SetVolumeEffect(StoreGame.LoadInt(StoreGame.EType.SOUND_EFFECT, (int)StoreGame.EToggle.ON) == (int)StoreGame.EToggle.OFF);

        SetVolumeBackground(StoreGame.LoadInt(StoreGame.EType.SOUND_BACKGROUND, (int)StoreGame.EToggle.ON) == (int)StoreGame.EToggle.OFF);
    }