Beispiel #1
0
 public ComponentData GetComponent(int id)
 {
     if (!_componentMap.TryGetValue(id, out var item))
     {
         _componentMap.Add(id, null);
         _componentMap[id] = item = ComponentData.Deserialize(_jsonDatabase.GetComponent(id), this);
     }
     if (item == null)
     {
         throw new DatabaseException(CircularDependencyText + "Component_" + id);
     }
     return(item);
 }