Beispiel #1
0
 public void AddObject(UpdatableObject obj)
 {
     this.updateList.Add(obj);
     if (obj is IDrawable)
     {
         SpriteGroup group = new SpriteGroup(obj as IDrawable);
         spriteGroups.Add(group);
         if (obj is UIElement)
         {
             group.AddSpritesToContainer(foregroundContainer);
         }
         else
         {
             group.AddSpritesToContainer(backgroundContainer);
         }
     }
     if (obj is Track)
     {
         activeTracks.Add(obj as Track);
     }
     if (obj is Note)
     {
         activeNotes.Add(obj as Note);
     }
 }
Beispiel #2
0
 public void AddObject(UpdatableObject obj)
 {
     updateList.Add(obj);
     if (obj is IDrawable)
     {
         SpriteGroup group = new SpriteGroup(obj as IDrawable);
         spriteGroups.Add(group);
         if (obj is UIElement)
         {
             group.AddSpritesToContainer(foregroundContainer);
         }
         else
         {
             group.AddSpritesToContainer(songsContainer);
         }
     }
 }