コード例 #1
0
        protected override void OnChange(FieldInfo field, object oldVal, object newVal)
        {
            //Change evt
            if (field.Name == nameof(alPreset))
            {
                ChangeALPreset((ALPresets)newVal);
            }
            else
            {
                alPreset = ALPresets.Custom;
            }

            RefreshGUI();
        }
コード例 #2
0
        internal void ChangeALPreset(ALPresets preset)
        {
            //Refresh fields
            switch (preset)
            {
            case ALPresets.Default:
                intensityMultiplier = 1.0f;
                rangeMultiplier     = 1.0f;
                nightBrightness     = 1;
                ambienceLevel       = 0.2f;
                fillLevel           = 0.4f;
                fillColorLevel      = 0.5f;
                auroraIntensity     = 0.8f;
                auroraSaturation    = 1.6f;

                break;

            case ALPresets.TLD_Default:
                intensityMultiplier = 0f;
                rangeMultiplier     = 0f;
                nightBrightness     = 0;
                ambienceLevel       = 1f;
                fillLevel           = 1f;
                fillColorLevel      = 1f;
                auroraIntensity     = 1f;
                auroraSaturation    = 1f;

                break;

            case ALPresets.Realistic:
                intensityMultiplier = 1f;
                rangeMultiplier     = 1.1f;
                nightBrightness     = 0;
                ambienceLevel       = 0f;
                fillLevel           = 0.1f;
                fillColorLevel      = 0f;
                auroraIntensity     = 0.3f;
                auroraSaturation    = 1.4f;

                break;

            case ALPresets.Darker_Interiors:
                intensityMultiplier = 0.7f;
                rangeMultiplier     = 0.7f;
                nightBrightness     = 1;
                ambienceLevel       = 0.2f;
                fillLevel           = 0.1f;
                fillColorLevel      = 0f;
                auroraIntensity     = 0.1f;
                auroraSaturation    = 0.8f;

                break;

            case ALPresets.Brighter_Interiors:
                intensityMultiplier = 1.3f;
                rangeMultiplier     = 1.3f;
                nightBrightness     = 2;
                ambienceLevel       = 1.4f;
                fillLevel           = 1.2f;
                fillColorLevel      = 1f;
                auroraIntensity     = 1.2f;
                auroraSaturation    = 1.6f;

                break;

            case ALPresets.Endless_Day:
                intensityMultiplier = 1.5f;
                rangeMultiplier     = 1.5f;
                nightBrightness     = 3;
                ambienceLevel       = 1.7f;
                fillLevel           = 1.5f;
                fillColorLevel      = 2f;
                auroraIntensity     = 2f;
                auroraSaturation    = 2f;

                break;

            case ALPresets.Dark_World:
                intensityMultiplier = 0f;
                rangeMultiplier     = 0f;
                nightBrightness     = 0;
                ambienceLevel       = 0f;
                fillLevel           = 0f;
                fillColorLevel      = 0f;
                auroraIntensity     = 0f;
                auroraSaturation    = 0f;

                break;
            }
        }