/// <summary> /// Only for some testing values /// </summary> public void InitDefault() { Birth.AddKey(0, 1.0f); Life.AddKey(0, 10.0f); Thickness.AddKey(0, 1.0f); Velocity.AddKey(0, new Vector3(0, 1, 0)); MyAnimatedPropertyVector4 colorKey = new MyAnimatedPropertyVector4(Color.Name); colorKey.AddKey(0, new Vector4(1, 0, 0, 1)); colorKey.AddKey(1, new Vector4(0, 0, 1, 1)); Color.AddKey(0, colorKey); MyAnimatedPropertyFloat radiusKey = new MyAnimatedPropertyFloat(Radius.Name); radiusKey.AddKey(0, 1.0f); Radius.AddKey(0, radiusKey); MyAnimatedPropertyTransparentMaterial materialKey = new MyAnimatedPropertyTransparentMaterial(Material.Name); materialKey.AddKey(0, MyTransparentMaterials.GetMaterial("Smoke")); Material.AddKey(0, materialKey); LODBirth.AddKey(0, 1.0f); LODRadius.AddKey(0, 1.0f); UseLayerSorting.SetValue(false); SortLayer.SetValue(-1); }
public void InitDefault() { Birth.AddKey(0, 1.0f); Life.AddKey(0, 10.0f); Thickness.AddKey(0, 1.0f); Velocity.AddKey(0, new Vector3(0, 1, 0)); MyAnimatedPropertyVector4 colorKey = new MyAnimatedPropertyVector4(Color.Name); colorKey.AddKey(0, new Vector4(1, 0, 0, 1)); colorKey.AddKey(1, new Vector4(0, 0, 1, 1)); Color.AddKey(0, colorKey); MyAnimatedPropertyFloat radiusKey = new MyAnimatedPropertyFloat(Radius.Name); radiusKey.AddKey(0, 1.0f); Radius.AddKey(0, radiusKey); MyAnimatedPropertyTransparentMaterial materialKey = new MyAnimatedPropertyTransparentMaterial(Material.Name); materialKey.AddKey(0, MyTransparentMaterials.GetMaterial("Smoke")); Material.AddKey(0, materialKey); LODBirth.AddKey(0, 1.0f); LODBirth.AddKey(MyConstants.MAX_PARTICLE_DISTANCE_DEFAULT, 0f); LODRadius.AddKey(0, 1.0f); PivotDistVar.SetValue(1.0f); AccelerationVar.SetValue(0.0f); UseLayerSorting.SetValue(false); SortLayer.SetValue(-1); }