예제 #1
0
 public override void Draw(GameTime gameTime)
 {
     // Draw game components
     foreach (DrawableGameComponent component in gameComponents.OfType <DrawableGameComponent>())
     {
         component.Draw(gameTime);
     }
     base.Draw(gameTime);
 }
예제 #2
0
파일: Scene.cs 프로젝트: qipa/KEngine-2
 /// <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>());
 }