public void SetAllObjects(ObjectInfo[] allObjs) { allObjects = new List <ObjectInfo>(allObjs); mapObjects.Clear(); foreach (ObjectInfo obj in allObjects) { mapObjects[obj.ID] = obj; } variables.Sync(allObjects); }
public void SetAllObjects(ObjectInfo[] allObjs) { allObjects = new List <ObjectInfo>(allObjs); mapObjects.Clear(); objectsWithChildren.Clear(); foreach (ObjectInfo obj in allObjects) { mapObjects[obj.ID] = obj; if (obj.Parent.HasValue) { ObjectRef parent = obj.Parent.Value.Object; objectsWithChildren.Add(parent); } } variables.Sync(allObjects); }