public static BioParticleModuleColorOverLife Parse(ExportEntry export) { var props = export.GetProperties(); var bpmcol = new BioParticleModuleColorOverLife(); bpmcol.Export = export; bpmcol.ColorOverLife = DistributionVector.FromStruct(props.GetProp <StructProperty>("ColorOverLife")); bpmcol.AlphaOverLife = DistributionFloat.FromStruct(props.GetProp <StructProperty>("AlphaOverLife")); return(bpmcol); }
public static BioParticleSpriteEmitter Parse(ExportEntry export) { BioParticleSpriteEmitter bpse = new BioParticleSpriteEmitter() { Export = export }; var props = export.GetProperties(); bpse.SpawnRate = DistributionFloat.FromStruct(props.GetProp <StructProperty>("SpawnRate")); bpse.EmitterName = props.GetProp <NameProperty>("EmitterName")?.Value; var lods = props.GetProp <ArrayProperty <ObjectProperty> >("LODLevels").Select(x => BioParticleLODLevel.Parse(x.ResolveToEntry(export.FileRef) as ExportEntry)); bpse.LODLevels = new ObservableCollectionExtended <BioParticleLODLevel>(lods); return(bpse); }