コード例 #1
0
        public static OptionManager GetInstance()
        {
            if (!instance)
            {
                instance = GameObject.FindObjectOfType(typeof(OptionManager)) as OptionManager;

                if (!instance)
                {
                    ErrorMessages.Instance.MissingSingletoneObject("OptionManager");
                }
            }

            return(instance);
        }
コード例 #2
0
        /// <summary>
        /// <para>Eng. Initialize Graphic Resolution Dropdown options. </para>
        /// <para>Kor. 그래픽 해상도 드롭다운 옵션을 초기화합니다. </para>
        /// </summary>
        public int InitResolutionOptions()
        {
            int _resolutionIndex = 0;
            int _tmpIndex        = 0;

            foreach (Resolution _resolution in Screen.resolutions)
            {
                if (OptionManager.GetInstance()._optionData.ScreenResolution.width == _resolution.width && OptionManager.GetInstance()._optionData.ScreenResolution.height == _resolution.height)
                {
                    _resolutionIndex = _tmpIndex;
                }

                _screenResolutionDropdown.options.Add(new Dropdown.OptionData(_resolution.width + "*" + _resolution.height));
                _tmpIndex++;
            }

            return(_resolutionIndex);
        }
コード例 #3
0
        /// <summary>
        /// <para>Eng. Pushed "Apply" Button in Game Option State. </para>
        /// <para>Kor. 게임  옵션 상태에서, "적용" 버튼을 눌렀습니다. </para>
        /// </summary>
        public void PushedGameAppliedButton()
        {
            OptionManager.GetInstance()._optionData.DialogueSpeedIndex = _dialogueSpeedDropdown.value;

            OptionManager.GetInstance().SaveOptionData();
        }
コード例 #4
0
 /// <summary>
 /// <para>Eng. Initialize panel item of Game option. </para>
 /// <para>Kor. 게임 옵션 패널의 아이템 값을 초기화해줍니다. </para>
 /// </summary>
 public void InitGameOptionPanelItem()
 {
     _dialogueSpeedDropdown.value = OptionManager.GetInstance()._optionData.DialogueSpeedIndex;
 }
コード例 #5
0
 /// <summary>
 /// <para>Eng. Initialize panel item of Sound option. </para>
 /// <para>Kor. 사운드 옵션 패널의 아이템 값을 초기화해줍니다. </para>
 /// </summary>
 public void InitSoundOptionPanelItem()
 {
     _bgmVolumeSlider.GetComponent <Slider>().value    = OptionManager.GetInstance()._optionData.BGMVolume;
     _effectVolumeSlider.GetComponent <Slider>().value = OptionManager.GetInstance()._optionData.EffectVolume;
 }
コード例 #6
0
 /// <summary>
 /// <para>Eng. Initialize panel item of Graphic option. </para>
 /// <para>Kor. 그래픽 옵션 패널의 아이템 값을 초기화해줍니다. </para>
 /// </summary>
 public void InitGraphicOptionPanelItem()
 {
     _screenResolutionDropdown.value = InitResolutionOptions();
     _fullscreenModeDropdown.value   = OptionManager.GetInstance()._optionData.FullscreenModeIndex;
     _qualityDropdown.value          = OptionManager.GetInstance()._optionData.QualityIndex;
 }