public void Read(AssetReader reader) { Shape = (ParticleSystemForceFieldShape)reader.ReadInt32(); StartRange = reader.ReadSingle(); EndRange = reader.ReadSingle(); Length = reader.ReadSingle(); GravityFocus = reader.ReadSingle(); RotationRandomness.Read(reader); DirectionCurveX.Read(reader); DirectionCurveY.Read(reader); DirectionCurveZ.Read(reader); GravityCurve.Read(reader); RotationSpeedCurve.Read(reader); RotationAttractionCurve.Read(reader); DragCurve.Read(reader); VectorField.Read(reader); VectorFieldSpeedCurve.Read(reader); VectorFieldAttractionCurve.Read(reader); MultiplyDragByParticleSize = reader.ReadBoolean(); MultiplyDragByParticleVelocity = reader.ReadBoolean(); reader.AlignStream(AlignType.Align4); }
public YAMLNode ExportYAML(IExportContainer container) { YAMLMappingNode node = new YAMLMappingNode(); node.Add(ShapeName, (int)Shape); node.Add(StartRangeName, StartRange); node.Add(EndRangeName, EndRange); node.Add(LengthName, Length); node.Add(GravityFocusName, GravityFocus); node.Add(RotationRandomnessName, RotationRandomness.ExportYAML(container)); node.Add(DirectionCurveXName, DirectionCurveX.ExportYAML(container)); node.Add(DirectionCurveYName, DirectionCurveY.ExportYAML(container)); node.Add(DirectionCurveZName, DirectionCurveZ.ExportYAML(container)); node.Add(GravityCurveName, GravityCurve.ExportYAML(container)); node.Add(RotationSpeedCurveName, RotationSpeedCurve.ExportYAML(container)); node.Add(RotationAttractionCurveName, RotationAttractionCurve.ExportYAML(container)); node.Add(DragCurveName, DragCurve.ExportYAML(container)); node.Add(VectorFieldName, VectorField.ExportYAML(container)); node.Add(VectorFieldSpeedCurveName, VectorFieldSpeedCurve.ExportYAML(container)); node.Add(VectorFieldAttractionCurveName, VectorFieldAttractionCurve.ExportYAML(container)); node.Add(MultiplyDragByParticleSizeName, MultiplyDragByParticleSize); node.Add(MultiplyDragByParticleVelocityName, MultiplyDragByParticleVelocity); return(node); }