Ejemplo n.º 1
0
 public override void Draw(GameTime gameTime)
 {
     // Draw game components
     foreach (DrawableGameComponent component in gameComponents.OfType <DrawableGameComponent>())
     {
         component.Draw(gameTime);
     }
     base.Draw(gameTime);
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Returns all Entities of type T in this scene.
 /// </summary>
 /// <returns>The entity.</returns>
 /// <typeparam name="T">The Entity type to search for</typeparam>
 public IEnumerable <T> FindEntity <T>() where T : Entity
 {
     return(items.OfType <T>());
 }