| | |
| | | public void SetGameFps(GameFps _frame)
|
| | | {
|
| | | LocalSave.SetInt(GAMEFRAME_KEY, (int)_frame);
|
| | | SetFPSLimit((int)_frame);
|
| | | Application.targetFrameRate = Mathf.Clamp((int)_frame, 30, 60);
|
| | | if (gameFrameChangeEvent != null)
|
| | | {
|
| | | gameFrameChangeEvent();
|
| | |
| | | switch (_quality)
|
| | | {
|
| | | case GameQuality.Low:
|
| | | Shader.globalMaximumLOD = 250;
|
| | | Shader.globalMaximumLOD = 300;
|
| | | Shader.DisableKeyword("QUALITY_HGH");
|
| | | Shader.DisableKeyword("QUALITY_MED");
|
| | | Shader.EnableKeyword("QUALITY_LOW");
|
| | | break;
|
| | | case GameQuality.Medium:
|
| | | Shader.globalMaximumLOD = 250;
|
| | | Shader.globalMaximumLOD = 300;
|
| | | Shader.DisableKeyword("QUALITY_HGH");
|
| | | Shader.EnableKeyword("QUALITY_MED");
|
| | | Shader.DisableKeyword("QUALITY_LOW");
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | public void SetFPSLimit(int _fps)
|
| | | {
|
| | | Application.targetFrameRate = Mathf.Clamp(_fps, 30, 60);
|
| | | }
|
| | |
|
| | | public int GetFPSLimit()
|
| | | {
|
| | | return (int)GetGameFps();
|
| | | }
|
| | |
|
| | | public void LetFPSUnLimit()
|
| | | {
|