Example #1
0
 public static void ApplyPersonalContrastDelta()
 {
     if (Singleton <MiHoYoGameData> .Instance != null)
     {
         GraphicsSettingUtil.SetPostFXContrast(Singleton <MiHoYoGameData> .Instance.GeneralLocalData.PersonalGraphicsSetting.ContrastDelta);
     }
 }
Example #2
0
 public void OnElevatorFloorAnimEvent(int phase)
 {
     if (phase == 1)
     {
         GraphicsSettingUtil.EnableUIAvatarsDynamicBone(false);
     }
 }
Example #3
0
 public void OnDynamicBoneBtnClick(bool willBeOn)
 {
     this._modifiedPersonalSetting.IsUserDefinedGrade             = false;
     this._modifiedPersonalSetting.IsUserDefinedVolatile          = true;
     this._modifiedPersonalSetting.VolatileSetting.UseDynamicBone = willBeOn;
     GraphicsSettingUtil.EnableDynamicBone(willBeOn);
     this.ShowDynamicBone(this._modifiedPersonalSetting.VolatileSetting.UseDynamicBone, false);
 }
Example #4
0
 public void OnResolutionBtnClick(int grade)
 {
     this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
     this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
     this._modifiedPersonalSetting.ResolutionQuality     = (ResolutionQualityGrade)grade;
     GraphicsSettingUtil.ApplyResolution(this._modifiedPersonalSetting.ResolutionPercentage, this._modifiedPersonalSetting.ResolutionQuality, this._modifiedPersonalSetting.RecommendResolutionX, this._modifiedPersonalSetting.RecommendResolutionY);
     this.ShowResolution(this._modifiedPersonalSetting.ResolutionQuality, false);
 }
Example #5
0
 public void OnReflectionBtnClick(bool willBeOn)
 {
     this._modifiedPersonalSetting.IsUserDefinedGrade            = false;
     this._modifiedPersonalSetting.IsUserDefinedVolatile         = true;
     this._modifiedPersonalSetting.VolatileSetting.UseReflection = willBeOn;
     GraphicsSettingUtil.EnableReflection(willBeOn);
     this.ShowReflection(this._modifiedPersonalSetting.VolatileSetting.UseReflection, false);
 }
Example #6
0
        public void OnHDRBtnClick()
        {
            this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
            this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
            bool useHDR = this._modifiedPersonalSetting.VolatileSetting.UseHDR;

            this._modifiedPersonalSetting.VolatileSetting.UseHDR = !useHDR;
            GraphicsSettingUtil.EnableHDR(useHDR);
            this.ShowHDR(this._modifiedPersonalSetting.VolatileSetting.UseHDR, false, true);
        }
Example #7
0
        public void OnDistortionBtnClick()
        {
            this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
            this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
            bool useDistortion = this._modifiedPersonalSetting.VolatileSetting.UseDistortion;

            this._modifiedPersonalSetting.VolatileSetting.UseDistortion = !useDistortion;
            GraphicsSettingUtil.EnableDistortion(useDistortion);
            this.ShowDistortion(this._modifiedPersonalSetting.VolatileSetting.UseDistortion, false, true);
        }
Example #8
0
        public void OnAABtnClick()
        {
            this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
            this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
            bool useFXAA = this._modifiedPersonalSetting.VolatileSetting.UseFXAA;

            this._modifiedPersonalSetting.VolatileSetting.UseFXAA = !useFXAA;
            GraphicsSettingUtil.EnableFXAA(useFXAA);
            this.ShowAA(this._modifiedPersonalSetting.VolatileSetting.UseFXAA, false, true);
        }
Example #9
0
        public void OnPostFXBtnClick(bool willBeOn)
        {
            this._modifiedPersonalSetting.IsUserDefinedGrade        = false;
            this._modifiedPersonalSetting.IsUserDefinedVolatile     = true;
            this._modifiedPersonalSetting.VolatileSetting.UsePostFX = willBeOn;
            bool forceWhenDisable = true;

            GraphicsSettingUtil.EnablePostFX(willBeOn, forceWhenDisable);
            this.ShowPostFX(this._modifiedPersonalSetting, false);
        }
Example #10
0
 public void OnTargetFrameRateBtnClick(bool is30Rate)
 {
     this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
     this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
     if (is30Rate)
     {
         this._modifiedPersonalSetting.TargetFrameRate = 30;
     }
     else
     {
         this._modifiedPersonalSetting.TargetFrameRate = 60;
     }
     GraphicsSettingUtil.SetTargetFrameRate(this._modifiedPersonalSetting.TargetFrameRate);
     this.ShowTargetFrameRate(this._modifiedPersonalSetting.TargetFrameRate, false);
 }
Example #11
0
 public void OnPostFXGradeBtnClick()
 {
     this._modifiedPersonalSetting.IsUserDefinedGrade    = false;
     this._modifiedPersonalSetting.IsUserDefinedVolatile = true;
     if (this._modifiedPersonalSetting.VolatileSetting.PostFXGrade == PostEffectQualityGrade.Low)
     {
         this._modifiedPersonalSetting.VolatileSetting.PostFXGrade = PostEffectQualityGrade.High;
     }
     else
     {
         this._modifiedPersonalSetting.VolatileSetting.PostFXGrade = PostEffectQualityGrade.Low;
     }
     GraphicsSettingUtil.SetPostEffectBufferSizeByQuality(this._modifiedPersonalSetting.PostFxGradeBufferSize, this._modifiedPersonalSetting.VolatileSetting.PostFXGrade);
     this.ShowPostFXGrade(this._modifiedPersonalSetting.VolatileSetting.PostFXGrade, false, true);
 }
Example #12
0
        public static void ApplySettingConfig(ConfigGraphicsSetting setting)
        {
            GraphicsSettingUtil.SetTargetFrameRate(setting.TargetFrameRate);
            bool forceWhenDisable = true;

            GraphicsSettingUtil.EnablePostFX(setting.VolatileSetting.UsePostFX, forceWhenDisable);
            GraphicsSettingUtil.ApplyResolution(setting.ResolutionPercentage, setting.ResolutionQuality, setting.RecommendResolutionX, setting.RecommendResolutionY);
            GraphicsSettingUtil.SetPostEffectBufferSizeByQuality(setting.PostFxGradeBufferSize, setting.VolatileSetting.PostFXGrade);
            GraphicsSettingUtil.EnableHDR(setting.VolatileSetting.UseHDR);
            GraphicsSettingUtil.EnableDistortion(setting.VolatileSetting.UseDistortion);
            GraphicsSettingUtil.EnableReflection(setting.VolatileSetting.UseReflection);
            GraphicsSettingUtil.EnableFXAA(setting.VolatileSetting.UseFXAA);
            GraphicsSettingUtil.EnableDynamicBone(setting.VolatileSetting.UseDynamicBone);
            GraphicsSettingUtil.EnableStaticCloudMode(!setting.VolatileSetting.UseDynamicBone);
        }
Example #13
0
        public void Awake()
        {
            GraphicsSettingUtil.SetTargetFrameRate(60);
            GeneralLogicManager.InitOnGameStart();
            Singleton <MainUIManager> .Instance.SetMainCanvas(this);

            this.assetbundleRetryTimes = 0;
            this._status = Status.Default;
            this._retryAssetBundleWaitTimer = 0f;
            this._videoPlayer = base.transform.Find("Video/VideoPlayer").GetComponent <MediaPlayer>();
            this._videoPlayer.Events.AddListener(new UnityAction <MediaPlayer, MediaPlayerEvent.EventType, ErrorCode>(this.OnVideoEvent));
            this._videoPlayer.gameObject.SetActive(false);
            this._videoDisplay = base.transform.Find("Video/VideoDisplay").GetComponent <DisplayIMGUI>();
            this._videoDisplay.gameObject.SetActive(false);
            base.transform.Find("Video/BlackPanel").gameObject.SetActive(false);
            base.transform.Find("Video").gameObject.SetActive(false);
        }
Example #14
0
 public void OnElevatorFloorPhase2AnimOver()
 {
     GraphicsSettingUtil.EnableUIAvatarsDynamicBone(true);
     Camera.main.gameObject.GetComponent <Animation>().Play("BeforeEnterSpaceship");
 }
Example #15
0
 public void OnContrastDeltaChanged()
 {
     this._contrastDelta = ((this._contrastSlider.value - this._contrastShowMinValue) / 20f) - 1f;
     GraphicsSettingUtil.SetPostFXContrast(this._contrastDelta);
     this.ShowContrast((int)this._contrastSlider.value);
 }