public override void Draw(GameTime gameTime) { // Draw game components foreach (DrawableGameComponent component in gameComponents.OfType <DrawableGameComponent>()) { component.Draw(gameTime); } base.Draw(gameTime); }
/// <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>()); }