Пример #1
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("lengthInSec", LengthInSec);
            node.Add("simulationSpeed", SimulationSpeed);
            node.Add("stopAction", StopAction);
            node.Add("looping", Looping);
            node.Add("prewarm", Prewarm);
            node.Add("playOnAwake", PlayOnAwake);
            node.Add("useUnscaledTime", UseUnscaledTime);
            node.Add("autoRandomSeed", GetAutoRandomSeed(container.Version));
            node.Add("useRigidbodyForVelocity", GetUseRigidbodyForVelocity(container.Version));
            node.Add("startDelay", GetStartDelay(container.Version).ExportYAML(container));
            node.Add("moveWithTransform", (int)MoveWithTransform);
            node.Add("moveWithCustomTransform", MoveWithCustomTransform.ExportYAML(container));
            node.Add("scalingMode", (int)GetScalingMode(container.Version));
            node.Add("randomSeed", RandomSeed);
            node.Add("InitialModule", InitialModule.ExportYAML(container));
            node.Add("ShapeModule", ShapeModule.ExportYAML(container));
            node.Add("EmissionModule", EmissionModule.ExportYAML(container));
            node.Add("SizeModule", SizeModule.ExportYAML(container));
            node.Add("RotationModule", RotationModule.ExportYAML(container));
            node.Add("ColorModule", ColorModule.ExportYAML(container));
            node.Add("UVModule", UVModule.ExportYAML(container));
            node.Add("VelocityModule", VelocityModule.ExportYAML(container));
            node.Add("InheritVelocityModule", GetInheritVelocityModule(container.Version).ExportYAML(container));
            node.Add("ForceModule", ForceModule.ExportYAML(container));
            node.Add("ExternalForcesModule", GetExternalForcesModule(container.Version).ExportYAML(container));
            node.Add("ClampVelocityModule", ClampVelocityModule.ExportYAML(container));
            node.Add("NoiseModule", GetNoiseModule(container.Version).ExportYAML(container));
            node.Add("SizeBySpeedModule", SizeBySpeedModule.ExportYAML(container));
            node.Add("RotationBySpeedModule", RotationBySpeedModule.ExportYAML(container));
            node.Add("ColorBySpeedModule", ColorBySpeedModule.ExportYAML(container));
            node.Add("CollisionModule", CollisionModule.ExportYAML(container));
            node.Add("TriggerModule", GetTriggerModule(container.Version).ExportYAML(container));
            node.Add("SubModule", SubModule.ExportYAML(container));
            node.Add("LightsModule", GetLightsModule(container.Version).ExportYAML(container));
            node.Add("TrailModule", GetTrailModule(container.Version).ExportYAML(container));
            node.Add("CustomDataModule", GetCustomDataModule(container.Version).ExportYAML(container));
            return(node);
        }
Пример #2
0
        protected override YAMLMappingNode ExportYAMLRoot(IExportContainer container)
        {
            YAMLMappingNode node = base.ExportYAMLRoot(container);

            node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(LengthInSecName, LengthInSec);
            node.Add(SimulationSpeedName, SimulationSpeed);
            node.Add(StopActionName, (int)StopAction);
            node.Add(LoopingName, Looping);
            node.Add(PrewarmName, Prewarm);
            node.Add(PlayOnAwakeName, PlayOnAwake);
            node.Add(UseUnscaledTimeName, UseUnscaledTime);
            node.Add(AutoRandomSeedName, GetAutoRandomSeed(container.Version));
            node.Add(UseRigidbodyForVelocityName, GetUseRigidbodyForVelocity(container.Version));
            node.Add(StartDelayName, GetStartDelay(container.Version).ExportYAML(container));
            node.Add(MoveWithTransformName, (int)MoveWithTransform);
            node.Add(MoveWithCustomTransformName, MoveWithCustomTransform.ExportYAML(container));
            node.Add(ScalingModeName, (int)GetScalingMode(container.Version));
            node.Add(RandomSeedName, RandomSeed);
            node.Add(InitialModuleName, InitialModule.ExportYAML(container));
            node.Add(ShapeModuleName, ShapeModule.ExportYAML(container));
            node.Add(EmissionModuleName, EmissionModule.ExportYAML(container));
            node.Add(SizeModuleName, SizeModule.ExportYAML(container));
            node.Add(RotationModuleName, RotationModule.ExportYAML(container));
            node.Add(ColorModuleName, ColorModule.ExportYAML(container));
            node.Add(UVModuleName, UVModule.ExportYAML(container));
            node.Add(VelocityModuleName, VelocityModule.ExportYAML(container));
            node.Add(InheritVelocityModuleName, GetInheritVelocityModule(container.Version).ExportYAML(container));
            node.Add(ForceModuleName, ForceModule.ExportYAML(container));
            node.Add(ExternalForcesModuleName, GetExternalForcesModule(container.Version).ExportYAML(container));
            node.Add(ClampVelocityModuleName, ClampVelocityModule.ExportYAML(container));
            node.Add(NoiseModuleName, GetNoiseModule(container.Version).ExportYAML(container));
            node.Add(SizeBySpeedModuleName, SizeBySpeedModule.ExportYAML(container));
            node.Add(RotationBySpeedModuleName, RotationBySpeedModule.ExportYAML(container));
            node.Add(ColorBySpeedModuleName, ColorBySpeedModule.ExportYAML(container));
            node.Add(CollisionModuleName, CollisionModule.ExportYAML(container));
            node.Add(TriggerModuleName, GetTriggerModule(container.Version).ExportYAML(container));
            node.Add(SubModuleName, SubModule.ExportYAML(container));
            node.Add(LightsModuleName, GetLightsModule(container.Version).ExportYAML(container));
            node.Add(TrailModuleName, GetTrailModule(container.Version).ExportYAML(container));
            node.Add(CustomDataModuleName, GetCustomDataModule(container.Version).ExportYAML(container));
            return(node);
        }
Пример #3
0
        protected override YAMLMappingNode ExportYAMLRoot(IAssetsExporter exporter)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = base.ExportYAMLRoot(exporter);
            node.AddSerializedVersion(GetSerializedVersion(exporter.Version));
            node.Add("lengthInSec", LengthInSec);
            node.Add("simulationSpeed", SimulationSpeed);
            node.Add("stopAction", StopAction);
            node.Add("looping", Looping);
            node.Add("prewarm", Prewarm);
            node.Add("playOnAwake", PlayOnAwake);
            node.Add("useUnscaledTime", UseUnscaledTime);
            node.Add("autoRandomSeed", AutoRandomSeed);
            node.Add("useRigidbodyForVelocity", UseRigidbodyForVelocity);
            node.Add("startDelay", StartDelay.ExportYAML(exporter));
            node.Add("moveWithTransform", MoveWithTransform);
            node.Add("moveWithCustomTransform", MoveWithCustomTransform.ExportYAML(exporter));
            node.Add("scalingMode", ScalingMode);
            node.Add("randomSeed", RandomSeed);
            node.Add("InitialModule", InitialModule.ExportYAML(exporter));
            node.Add("ShapeModule", ShapeModule.ExportYAML(exporter));
            node.Add("EmissionModule", EmissionModule.ExportYAML(exporter));
            node.Add("SizeModule", SizeModule.ExportYAML(exporter));
            node.Add("RotationModule", RotationModule.ExportYAML(exporter));
            node.Add("ColorModule", ColorModule.ExportYAML(exporter));
            node.Add("UVModule", UVModule.ExportYAML(exporter));
            node.Add("VelocityModule", VelocityModule.ExportYAML(exporter));
            node.Add("InheritVelocityModule", InheritVelocityModule.ExportYAML(exporter));
            node.Add("ForceModule", ForceModule.ExportYAML(exporter));
            node.Add("ExternalForcesModule", ExternalForcesModule.ExportYAML(exporter));
            node.Add("ClampVelocityModule", ClampVelocityModule.ExportYAML(exporter));
            node.Add("NoiseModule", NoiseModule.ExportYAML(exporter));
            node.Add("SizeBySpeedModule", SizeBySpeedModule.ExportYAML(exporter));
            node.Add("RotationBySpeedModule", RotationBySpeedModule.ExportYAML(exporter));
            node.Add("ColorBySpeedModule", ColorBySpeedModule.ExportYAML(exporter));
            node.Add("CollisionModule", CollisionModule.ExportYAML(exporter));
            node.Add("TriggerModule", TriggerModule.ExportYAML(exporter));
            node.Add("SubModule", SubModule.ExportYAML(exporter));
            node.Add("LightsModule", LightsModule.ExportYAML(exporter));
            node.Add("TrailModule", TrailModule.ExportYAML(exporter));
            node.Add("CustomDataModule", CustomDataModule.ExportYAML(exporter));
            return(node);
        }