Exemplo n.º 1
0
 private void updateDoors(NotifyCollectionChangedEventArgs e)
 {
     foreach (var doorRenderer in doorRenderers.Values)
     {
         doorRenderer.Remove();
     }
     doorRenderers.Clear();
     foreach (var door in Ship.Doors)
     {
         foreach (var entrance in door.Entrances)
         {
             if (entrance.RoomID != -1)
             {
                 var doorRenderer = new DoorEntranceRenderer(this, door, entrance);
                 doorRenderers.Add(entrance, doorRenderer);
                 doorRenderer.Parent = this;
                 doorRenderer.Init();
             }
         }
     }
 }
Exemplo n.º 2
0
 private void updateDoors(NotifyCollectionChangedEventArgs e)
 {
     foreach (var doorRenderer in doorRenderers.Values)
     {
         doorRenderer.Remove();
     }
     doorRenderers.Clear();
     foreach (var door in Ship.Doors)
     {
         foreach (var entrance in door.Entrances)
         {
             if (entrance.RoomID != -1)
             {
                 var doorRenderer = new DoorEntranceRenderer(this, door, entrance);
                 doorRenderers.Add(entrance, doorRenderer);
                 doorRenderer.Parent = this;
                 doorRenderer.Init();
             }
         }
     }
 }