Ejemplo n.º 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);
         }
     }
 }
Ejemplo n.º 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);
         }
     }
 }