Пример #1
0
 private void OnGameObjectRemoved(GameObjectRemovedMessage msg)
 {
     if (_gameObjectLookup.ContainsKey(msg.GameObjectId))
     {
         // .ToList() to bring in local copy as we will be removing from the list we are iterating over
         foreach (var node in _gameObjectLookup[msg.GameObjectId].ToList())
         {
             RemoveComponent(node);
         }
     }
 }
Пример #2
0
 private void OnGameObjectRemoved(GameObjectRemovedMessage msg)
 {
     if (_gameObjectLookup.ContainsKey(msg.GameObjectId))
     {
         // .ToList() to bring in local copy as we will be removing from the list we are iterating over
         foreach (var node in _gameObjectLookup[msg.GameObjectId].ToList())
         {
             RemoveComponent(node);
         }
     }
 }