public virtual void Load(SerializationReader SR) { SR.ReadStartElement(); int version = SR.ReadVersion(); switch (version) { case 0: { Name = SR.ReadString(); Width = SR.ReadInt(); Height = SR.ReadInt(); Depth = SR.ReadInt(); Cubes = new Cube[Width, Height, Depth]; SR.ReadCubes(this); Permanents.Load(SR); Entitys.Load(SR); SR.ReadRectangles3D(this); break; } } SR.ReadEndElement(); for (int i = 0; i < Permanents.Length; i++) { Permanents[i].Map = this; } for (int e = 0; e < Entitys.Length; e++) { Entitys[e].Map = this; } }
public virtual void Load(SerializationReader SR) { SR.ReadStartElement(); int version = SR.ReadVersion(); switch (version) { case 0: { string ai = SR.ReadString(); if (ai != "") { AI = Info.Instance(ai) as AI; } if (AI != null) { AI.Entity = this; } ID = SR.ReadString(); X = SR.ReadInt(); Y = SR.ReadInt(); Z = SR.ReadInt(); Name = SR.ReadString(); Width = SR.ReadFloat(); Height = SR.ReadFloat(); CanMove = SR.ReadBool(); CanTarget = SR.ReadBool(); Cross = SR.ReadBool(); Direction = SR.ReadInt(); Flag.Value = SR.ReadInt(); Containers = SR.ReadContainers(); //Move = SR.ReadMove();//Supprimer!!!!! Body = SR.ReadBodyJSON(); break; } } SR.ReadEndElement(); }
public virtual void Load(SerializationReader SR) { SR.ReadStartElement(); int version = SR.ReadVersion(); switch (version) { case 0: { Name = SR.ReadString(); break; } } SR.ReadEndElement(); }
public virtual void Load(SerializationReader SR) { SR.ReadStartElement(); int version = SR.ReadVersion(); switch (version) { case 0: { Name = SR.ReadString(); Templates = SR.ReadJSONList <TemplateJSON>(); Form = SR.ReadJSON <Appearance>(); Control = SR.ReadJSON <Appearance>(); TextBox = SR.ReadJSON <Appearance>(); //Form.Load(SR); //Control.Load(SR); //TextBox.Load(SR); break; } } SR.ReadEndElement(); }