/// <summary>Deserialize into new object instance</summary> public Thing(LevelDeserializeContext context) { AnimationSet = context.ReadAnimationSet(); Position = context.br.ReadPosition(); FacingLeft = context.br.ReadBoolean(); overrideBehaviour = context.br.ReadNullableString(); includeInNavigation = context.br.ReadBoolean(); // Properties { int count = context.br.ReadInt32(); for (int i = 0; i < count; i++) { properties.Add(context.br.ReadString(), context.br.ReadString()); } } }
public Shim(LevelDeserializeContext context) { AnimationSet = context.ReadAnimationSet(); Position = context.br.ReadPosition(); FacingLeft = context.br.ReadBoolean(); parallaxX = context.br.ReadSingle(); parallaxY = context.br.ReadSingle(); animationNumber = context.br.ReadInt32(); ambientSoundSource = context.br.ReadNullableString(); if (context.Version >= 14) { tag = context.br.ReadInt32(); } if (context.Version >= 16) { int count = context.br.ReadInt32(); for (int i = 0; i < count; i++) { properties.Add(context.br.ReadString(), context.br.ReadString()); } } }