コード例 #1
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
#warning TODO: values acording to read version (current 2017.3.0f3)
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);
            node.AddSerializedVersion(GetSerializedVersion(container.Version));
            node.Add("type", (int)Type);
            node.Add("collisionMode", (int)CollisionMode);
            node.Add("colliderForce", ColliderForce);
            node.Add("multiplyColliderForceByParticleSize", MultiplyColliderForceByParticleSize);
            node.Add("multiplyColliderForceByParticleSpeed", MultiplyColliderForceByParticleSpeed);
            node.Add("multiplyColliderForceByCollisionAngle", GetExportMultiplyColliderForceByCollisionAngle(container.Version));
            node.Add("plane0", Plane0.ExportYAML(container));
            node.Add("plane1", Plane1.ExportYAML(container));
            node.Add("plane2", Plane2.ExportYAML(container));
            node.Add("plane3", Plane3.ExportYAML(container));
            node.Add("plane4", Plane4.ExportYAML(container));
            node.Add("plane5", Plane5.ExportYAML(container));
            node.Add("m_Dampen", Dampen.ExportYAML(container));
            node.Add("m_Bounce", Bounce.ExportYAML(container));
            node.Add("m_EnergyLossOnCollision", EnergyLossOnCollision.ExportYAML(container));
            node.Add("minKillSpeed", MinKillSpeed);
            node.Add("maxKillSpeed", GetExportMaxKillSpeed(container.Version));
            node.Add("radiusScale", GetExportRadiusScale(container.Version));
            node.Add("collidesWith", GetExportCollidesWith(container.Version).ExportYAML(container));
            node.Add("maxCollisionShapes", GetExportMaxCollisionShapes(container.Version));
            node.Add("quality", (int)Quality);
            node.Add("voxelSize", GetExportVoxelSize(container.Version));
            node.Add("collisionMessages", CollisionMessages);
            node.Add("collidesWithDynamic", GetExportCollidesWithDynamic(container.Version));
            node.Add("interiorCollisions", InteriorCollisions);
            return(node);
        }
コード例 #2
0
        public override YAMLNode ExportYAML(IExportContainer container)
        {
            YAMLMappingNode node = (YAMLMappingNode)base.ExportYAML(container);

            node.AddSerializedVersion(ToSerializedVersion(container.ExportVersion));
            node.Add(TypeName, (int)Type);
            node.Add(CollisionModeName, (int)CollisionMode);
            node.Add(ColliderForceName, ColliderForce);
            node.Add(MultiplyColliderForceByParticleSizeName, MultiplyColliderForceByParticleSize);
            node.Add(MultiplyColliderForceByParticleSpeedName, MultiplyColliderForceByParticleSpeed);
            node.Add(MultiplyColliderForceByCollisionAngleName, GetExportMultiplyColliderForceByCollisionAngle(container.Version));
            node.Add(Plane0Name, Plane0.ExportYAML(container));
            node.Add(Plane1Name, Plane1.ExportYAML(container));
            node.Add(Plane2Name, Plane2.ExportYAML(container));
            node.Add(Plane3Name, Plane3.ExportYAML(container));
            node.Add(Plane4Name, Plane4.ExportYAML(container));
            node.Add(Plane5Name, Plane5.ExportYAML(container));
            node.Add(DampenName, Dampen.ExportYAML(container));
            node.Add(BounceName, Bounce.ExportYAML(container));
            node.Add(EnergyLossOnCollisionName, EnergyLossOnCollision.ExportYAML(container));
            node.Add(MinKillSpeedName, MinKillSpeed);
            node.Add(MaxKillSpeedName, GetExportMaxKillSpeed(container.Version));
            node.Add(RadiusScaleName, GetExportRadiusScale(container.Version));
            node.Add(CollidesWithName, GetExportCollidesWith(container.Version).ExportYAML(container));
            node.Add(MaxCollisionShapesName, GetExportMaxCollisionShapes(container.Version));
            node.Add(QualityName, (int)Quality);
            node.Add(VoxelSizeName, GetExportVoxelSize(container.Version));
            node.Add(CollisionMessagesName, CollisionMessages);
            node.Add(CollidesWithDynamicName, GetExportCollidesWithDynamic(container.Version));
            node.Add(InteriorCollisionsName, InteriorCollisions);
            return(node);
        }