public virtual IEncodable Decode(General.Encoding.BinaryInput stream) { this.id = stream.ReadInt32(); this.Position = stream.ReadVector2(); this.Width = stream.ReadInt32(); this.Height = stream.ReadInt32(); return this; }
public IEncodable Decode(General.Encoding.BinaryInput stream) { position = stream.ReadVector2(); modelName = stream.ReadString(); entityIndex = stream.ReadInt32(); if (!string.IsNullOrEmpty(modelName)) { World world = EditorEngine.Instance.World; model = EditorEngine.Instance.GetModelByName(modelName); } EntityIO io = new EntityIO(stream, EditorEngine.Instance.CurrentMap.Factory, true); this.worldEntity = io.Read(); return this; }