//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(); }
public void SpawnSpriteAtRuntime(Sprite sprite) { NewSprites.Add(sprite); }