Beispiel #1
0
 public override void LoadFromJson(IJsonObject jsonNode)
 {
     foreach (IJsonObject child in jsonNode["turtles"].AsList)
     {
         var obj = new TurtleDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["tables"].AsList)
     {
         var obj = new TableDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["seats"].AsList)
     {
         var obj = new SeatDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["decorations"].AsList)
     {
         var obj = new DecorationDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
 }
 public override void LoadFromJson(IJsonObject jsonNode)
 {
     foreach (IJsonObject child in jsonNode["turtles"].AsList)
     {
         var obj = new TurtleDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["tables"].AsList)
     {
         var obj = new TableDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["seats"].AsList)
     {
         var obj = new SeatDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
     foreach (IJsonObject child in jsonNode["decorations"].AsList)
     {
         var obj = new DecorationDataModel();
         obj.LoadFromJson(child);
         ObjectData.Add(obj.ID, obj);
     }
 }