Пример #1
0
        public ConfigRain GetNullLerpAble()
        {
            ConfigRain rain = this.Clone();

            rain.density       = 0f;
            rain.splashDensity = 0f;
            rain.audioName     = this.audioName;
            rain.audioVolumn   = this.audioVolumn * 0.7f;
            rain.audioPitch    = this.audioPitch * 0.3f;
            return(rain);
        }
Пример #2
0
 public void CopyFrom(ConfigRain source)
 {
     this.density          = source.density;
     this.splashDensity    = source.splashDensity;
     this.speed            = source.speed;
     this.speedStrech      = source.speedStrech;
     this.size             = source.size;
     this.opaqueness       = source.opaqueness;
     this.splashOpaqueness = source.splashOpaqueness;
     this.audioName        = source.audioName;
     this.audioVolumn      = source.audioVolumn;
     this.audioPitch       = source.audioPitch;
 }
Пример #3
0
        public static ConfigRain Lerp(ConfigRain config1, ConfigRain config2, float t)
        {
            if ((config1 == null) && (config2 == null))
            {
                return(null);
            }
            ConfigRain rain = ScriptableObject.CreateInstance <ConfigRain>();

            rain.density          = Mathf.Lerp(config1.density, config2.density, t);
            rain.splashDensity    = Mathf.Lerp(config1.splashDensity, config2.splashDensity, t);
            rain.speed            = Mathf.Lerp(config1.speed, config2.speed, t);
            rain.speedStrech      = Mathf.Lerp(config1.speedStrech, config2.speedStrech, t);
            rain.size             = Mathf.Lerp(config1.size, config2.size, t);
            rain.opaqueness       = Mathf.Lerp(config1.opaqueness, config2.opaqueness, t);
            rain.splashOpaqueness = Mathf.Lerp(config1.splashOpaqueness, config2.splashOpaqueness, t);
            rain.audioVolumn      = Mathf.Lerp(config1.audioVolumn, config2.audioVolumn, t);
            rain.audioPitch       = Mathf.Lerp(config1.audioPitch, config2.audioPitch, t);
            rain.audioName        = config1.audioName;
            return(rain);
        }
Пример #4
0
 public static ConfigSubWeatherCollection Lerp(ConfigSubWeatherCollection config1, ConfigSubWeatherCollection config2, float t)
 {
     return(new ConfigSubWeatherCollection {
         configRain = ConfigRain.Lerp(config1.configRain, config2.configRain, t)
     });
 }
Пример #5
0
 public static ConfigSubWeatherCollection CreateDefault()
 {
     return(new ConfigSubWeatherCollection {
         configRain = ConfigRain.CreatDefault()
     });
 }