diff options
Diffstat (limited to 'Space Invaders/Program.cs')
-rw-r--r-- | Space Invaders/Program.cs | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/Space Invaders/Program.cs b/Space Invaders/Program.cs index 769bc0c..a005c56 100644 --- a/Space Invaders/Program.cs +++ b/Space Invaders/Program.cs @@ -41,10 +41,40 @@ namespace SpaceInvaders { // Init Obstacles for (int i = 0; i < 6; i++) { GameObject obstacle = new Obstacle(); - player.Parent = this; + obstacle.Parent = this; obstacle.xPos = 50 + (i * 90); obstacle.yPos = 90; GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90) + 8; + obstacle.yPos = 90; + GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90) + 16; + obstacle.yPos = 90; + GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90) + 24; + obstacle.yPos = 90; + GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90) + 32; + obstacle.yPos = 90; + GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90); + obstacle.yPos = 90 + 4; + GameObjects.Add(obstacle); + obstacle = new Obstacle(); + obstacle.Parent = this; + obstacle.xPos = 50 + (i * 90) + 32; + obstacle.yPos = 90 + 4; + GameObjects.Add(obstacle); } base.Start(); // Do start from inherited class, Required for the engine to actually start |