コード例 #1
0
ファイル: Mars.cs プロジェクト: thearunster/SOLID
 public void UpdateAliens()
 {
     foreach (var alien in Obstacles.OfType <Alien>())
     {
         AlienBehavior.MoveAlien(alien);
     }
 }
コード例 #2
0
ファイル: Mars.cs プロジェクト: thearunster/SOLID
 public Mars(Size bounds)
 {
     Bounds            = bounds;
     AlienBehavior     = new AlienBehavior();
     CenterOfThePlanet = new Point(Bounds.Width / 2, Bounds.Height / 2);
     _obstacles        = new List <IObstacle>();
 }