Пример #1
0
 internal void AddUserObject(int id, ITrackable toAdd)
 {
     print("adding object " + id);
     trackers.Add(id, toAdd);
     (globalState.objects ?? (globalState.objects = new List <RoomObjectObj>())).Add(toAdd.ToRoomObject());
     newRoomObjects.Add(toAdd.ToRoomObject());
 }
Пример #2
0
 public bool AddSceneObject(ITrackable tracker)
 {
     if (trackers.ContainsKey(tracker.id))
     {
         return(false);
     }
     trackers.Add(tracker.id, tracker);
     (globalState.objects ?? (globalState.objects = new List <RoomObjectObj>())).Add(tracker.ToRoomObject());
     newRoomObjects.Add(tracker.ToRoomObject());
     return(true);
 }