From eff4413449dc9dfe365ded241c524fe0bab104c2 Mon Sep 17 00:00:00 2001 From: Jakob Stendahl Date: Sun, 12 Nov 2017 21:35:43 +0100 Subject: Game is now working in its primitive state --- Space Invaders/Program.cs | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) (limited to 'Space Invaders/Program.cs') 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 -- cgit v1.2.3