示例#1
0
        public static void Apply()
        {
            if (IN_GAME_MAIN_CAMERA.MainCamera != null && IN_GAME_MAIN_CAMERA.MainCamera.GetComponent <TiltShift>() != null)
            {
                IN_GAME_MAIN_CAMERA.MainCamera.GetComponent <TiltShift>().enabled = Blur.Value;
            }
            if (IN_GAME_MAIN_CAMERA.BaseCamera != null)
            {
                IN_GAME_MAIN_CAMERA.BaseCamera.useOcclusionCulling = OcclusionCulling;
                IN_GAME_MAIN_CAMERA.BaseCamera.farClipPlane        = Mathf.RoundToInt(DrawDistance.Value);
            }
            ChangeQuality.setCurrentQuality();
            QualitySettings.masterTextureLimit   = TextureQuality.Value;
            QualitySettings.anisotropicFiltering = (AnisotropicFiltering)AnisotropicFiltering.Value;
            QualitySettings.vSyncCount           = VSync ? 1 : 0;
            int aa = 0;

            switch (AntiAliasing.Value)
            {
            case 0:
                break;

            case 1:
                aa = 2;
                break;

            case 2:
                aa = 4;
                break;

            case 3:
                aa = 8;
                break;

            default:
                aa = 0;
                break;
            }
            QualitySettings.antiAliasing    = aa;
            QualitySettings.maximumLODLevel = (int)Mathf.Round(MaxLODLevel.Value);
            QualitySettings.lodBias         = LODBias;
            QualitySettings.blendWeights    = (BlendWeights)(BlendWeight.Value <= 1 ? (BlendWeight.Value + 1) : 4);
            if (UseShadows.Value)
            {
                QualitySettings.shadowDistance   = ShadowDistance.Value;
                QualitySettings.shadowCascades   = (int)System.Math.Pow(2, ShadowCascades.Value);
                QualitySettings.shadowProjection = (UnityEngine.ShadowProjection)ShadowProjection.Value;
            }
            else
            {
                QualitySettings.shadowDistance   = 0f;
                QualitySettings.shadowCascades   = 1;
                QualitySettings.shadowProjection = UnityEngine.ShadowProjection.CloseFit;
            }
            Settings.Apply();
        }
示例#2
0
 private void Start()
 {
     ChangeQuality.setCurrentQuality();
     name = "MultiplayerManager";
     DontDestroyOnLoad(this);
     HeroCostume.Init();
     CharacterMaterials.Init();
     RCManager.ClearAll();
     heroes = new List <HERO>();
     titans = new List <TITAN>();
     hooks  = new List <Bullet>();
     AnarchyManager.DestroyMainScene();
 }
示例#3
0
 private void Awake()
 {
     QualitySettings.vSyncCount = 0;
     ChangeQuality.setCurrentQuality();
 }