Esempio n. 1
0
 protected BaseMapObject(long id)
 {
     ID          = id;
     Data        = new MapObjectDataCollection();
     Hierarchy   = new MapObjectHierarchy(this);
     BoundingBox = Box.Empty;
 }
Esempio n. 2
0
 protected BaseMapObject(SerialisedObject obj)
 {
     if (SerialisedName != obj.Name)
     {
         throw new Exception($"Tried to deserialise a {obj.Name} into a {SerialisedName}.");
     }
     ID          = obj.Get <long>("ID");
     IsSelected  = obj.Get <bool>("IsSelected");
     Data        = new MapObjectDataCollection();
     Hierarchy   = new MapObjectHierarchy(this);
     BoundingBox = Box.Empty;
     SetCustomSerialisedData(obj);
 }