예제 #1
0
 public static void SetDefaults()
 {
     SunProperties          = MySunProperties.Default;
     FogProperties          = MyFogProperties.Default;
     ImpostorProperties     = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
 }
예제 #2
0
 public static void SetDefaults()
 {
     SunProperties = MySunProperties.Default;
     FogProperties = MyFogProperties.Default;
     ImpostorProperties = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
 }
예제 #3
0
 public static void SetDefaults()
 {
     SunProperties          = new MySunProperties(MySunProperties.Default);
     FogProperties          = MyFogProperties.Default;
     ImpostorProperties     = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
     GodRaysProperties      = new MyGodRaysProperties();
     BackgroundTexture      = "BackgroundCube";
 }
예제 #4
0
 public static void SetDefaults()
 {
     SunProperties = MySunProperties.Default;
     FogProperties = MyFogProperties.Default;
     ImpostorProperties = new VRageRender.MyImpostorProperties[1];
     ParticleDustProperties = new MyParticleDustProperties();
     GodRaysProperties = new MyGodRaysProperties();
     BackgroundTexture = "BackgroundCube";
 }
 /// <param name="interpolator">0 - use this object, 1 - use other object</param>
 public MyParticleDustProperties InterpolateWith(MyParticleDustProperties otherProperties, float interpolator)
 {
     var result = new MyParticleDustProperties();
     result.DustFieldCountInDirectionHalf = MathHelper.Lerp(DustFieldCountInDirectionHalf, otherProperties.DustFieldCountInDirectionHalf, interpolator);
     result.DistanceBetween = MathHelper.Lerp(DistanceBetween, otherProperties.DistanceBetween, interpolator);
     result.AnimSpeed = MathHelper.Lerp(AnimSpeed, otherProperties.AnimSpeed, interpolator);
     result.Color = Color.Lerp(Color, otherProperties.Color, interpolator);
     result.Enabled = MathHelper.Lerp(Enabled ? 1 : 0, otherProperties.Enabled ? 1 : 0, interpolator) > 0.5f;
     result.DustBillboardRadius = interpolator <= 0.5f ? DustBillboardRadius : otherProperties.DustBillboardRadius;
     result.Texture = interpolator <= 0.5f ? Texture : otherProperties.Texture;
     return result;
 }
        /// <param name="interpolator">0 - use this object, 1 - use other object</param>
        public MyParticleDustProperties InterpolateWith(MyParticleDustProperties otherProperties, float interpolator)
        {
            var result = new MyParticleDustProperties();

            result.DustFieldCountInDirectionHalf = MathHelper.Lerp(DustFieldCountInDirectionHalf, otherProperties.DustFieldCountInDirectionHalf, interpolator);
            result.DistanceBetween     = MathHelper.Lerp(DistanceBetween, otherProperties.DistanceBetween, interpolator);
            result.AnimSpeed           = MathHelper.Lerp(AnimSpeed, otherProperties.AnimSpeed, interpolator);
            result.Color               = Color.Lerp(Color, otherProperties.Color, interpolator);
            result.Enabled             = MathHelper.Lerp(Enabled ? 1 : 0, otherProperties.Enabled ? 1 : 0, interpolator) > 0.5f;
            result.DustBillboardRadius = interpolator <= 0.5f ? DustBillboardRadius : otherProperties.DustBillboardRadius;
            result.Texture             = interpolator <= 0.5f ? Texture : otherProperties.Texture;
            return(result);
        }