Пример #1
0
 //This method takes the sprites from the temporary list and adds them to the main sprites list prior to running the update loop
 private void AddNewSprites()
 {
     foreach (Sprite sprite in NewSprites)
     {
         LevelSprites.Add(sprite);
         if (sprite is ICollidable)
         {
             game.CollisionHandler.CollisionListenersList.Add((ICollidable)sprite);
         }
     }
     NewSprites.Clear();
 }
Пример #2
0
 public void SpawnSpriteAtRuntime(Sprite sprite)
 {
     NewSprites.Add(sprite);
 }