Exemple #1
0
 void SaveRefractionEffects(IValueWriter w)
 {
     w.WriteStartNode(_refractionEffectsNodeName);
     {
         var validFx = _refractionEffects.Where(x => RefractionEffectFactory.IsValidType(x.GetType())).ToImmutable();
         w.WriteManyNodes(_refractionEffectListNodeName, validFx, RefractionEffectFactory.Write);
     }
     w.WriteEndNode(_refractionEffectsNodeName);
 }
Exemple #2
0
        void SaveRefractionEffects(IValueWriter w, MapSaveFlags saveFlags)
        {
            var validFx = _refractionEffects.Where(x => RefractionEffectFactory.IsValidType(x.GetType()));

            if ((saveFlags & MapSaveFlags.DoNotSort) == 0)
            {
                validFx = validFx.OrderBy(x => x, new BasicSpatialComparer());
            }
            validFx = validFx.ToImmutable();

            w.WriteStartNode(_refractionEffectsNodeName);
            {
                w.WriteManyNodes(_refractionEffectListNodeName, validFx, RefractionEffectFactory.Write);
            }
            w.WriteEndNode(_refractionEffectsNodeName);
        }