Example #1
0
        public void Deserialize(DataSerializer s)
        {
            Features = (FeatureFlags)s.ReadInt32();

            if (Features.IsFlagSet(FeatureFlags.TreeLeft))
            {
                TreeLeft = s.ReadSharedString();
            }
            if (Features.IsFlagSet(FeatureFlags.TreeMiddle))
            {
                TreeMiddle = s.ReadSharedString();
            }
            if (Features.IsFlagSet(FeatureFlags.TreeRight))
            {
                TreeRight = s.ReadSharedString();
            }
            if (Features.IsFlagSet(FeatureFlags.StreetLight))
            {
                StreetLight = s.ReadSharedString();
            }
            if (Features.IsFlagSet(FeatureFlags.RepeatDistances))
            {
                RepeatDistances = s.ReadVector4();
            }
        }
Example #2
0
        public void Serialize(DataSerializer s)
        {
            s.WriteInt32((int)Features);

            if (Features.IsFlagSet(FeatureFlags.TreeLeft))
            {
                s.WriteSharedString(TreeLeft);
            }
            if (Features.IsFlagSet(FeatureFlags.TreeMiddle))
            {
                s.WriteSharedString(TreeMiddle);
            }
            if (Features.IsFlagSet(FeatureFlags.TreeRight))
            {
                s.WriteSharedString(TreeRight);
            }
            if (Features.IsFlagSet(FeatureFlags.StreetLight))
            {
                s.WriteSharedString(StreetLight);
            }
            if (Features.IsFlagSet(FeatureFlags.RepeatDistances))
            {
                s.WriteVector4(RepeatDistances);
            }
        }