コード例 #1
0
 /// <param name="interpolator">0 - use this object, 1 - use other object</param>
 public MyFogProperties InterpolateWith(MyFogProperties otherProperties, float interpolator)
 {
     var result = new MyFogProperties();
     result.FogNear = MathHelper.Lerp(FogNear, otherProperties.FogNear, interpolator);
     result.FogFar = MathHelper.Lerp(FogFar, otherProperties.FogFar, interpolator);
     result.FogMultiplier = MathHelper.Lerp(FogMultiplier, otherProperties.FogMultiplier, interpolator);
     result.FogBacklightMultiplier = MathHelper.Lerp(FogBacklightMultiplier, otherProperties.FogBacklightMultiplier, interpolator);
     result.FogColor = Vector3.Lerp(FogColor, otherProperties.FogColor, interpolator);
     return result;
 }
コード例 #2
0
ファイル: MySector.cs プロジェクト: Bunni/Miner-Wars-2081
 public static void SetDefaults()
 {
     MySolarSystemArea defaults = MySolarSystemConstants.GetDefaultArea();
     SunProperties = defaults.SectorData.SunProperties;
     FogProperties = defaults.SectorData.FogProperties;
     DebrisProperties = defaults.SectorData.DebrisProperties;
     ImpostorProperties = defaults.SectorData.ImpostorProperties;
     ParticleDustProperties = defaults.SectorData.ParticleDustProperties;
     GodRaysProperties = defaults.SectorData.GodRaysProperties;
     BackgroundTexture = defaults.SectorData.BackgroundTexture;
 }
コード例 #3
0
        /// <param name="interpolator">0 - use this object, 1 - use other object</param>
        public MyFogProperties InterpolateWith(MyFogProperties otherProperties, float interpolator)
        {
            var result = new MyFogProperties();

            result.FogNear                = MathHelper.Lerp(FogNear, otherProperties.FogNear, interpolator);
            result.FogFar                 = MathHelper.Lerp(FogFar, otherProperties.FogFar, interpolator);
            result.FogMultiplier          = MathHelper.Lerp(FogMultiplier, otherProperties.FogMultiplier, interpolator);
            result.FogBacklightMultiplier = MathHelper.Lerp(FogBacklightMultiplier, otherProperties.FogBacklightMultiplier, interpolator);
            result.FogColor               = Vector3.Lerp(FogColor, otherProperties.FogColor, interpolator);
            return(result);
        }