aboutsummaryrefslogtreecommitdiff
path: root/Space Invaders/Program.cs
diff options
context:
space:
mode:
authorJakob Stendahl <jakob.stendahl@outlook.com>2017-11-12 21:35:43 +0100
committerJakob Stendahl <jakob.stendahl@outlook.com>2017-11-12 21:35:43 +0100
commiteff4413449dc9dfe365ded241c524fe0bab104c2 (patch)
tree58e7514bfa2aaf5cbbb024ca115940fc44dacbb2 /Space Invaders/Program.cs
parent76d19004e770c360feecd7a0f5c9b1c875d44bf1 (diff)
downloadSpace-Invaders-CS-Console-eff4413449dc9dfe365ded241c524fe0bab104c2.tar.gz
Space-Invaders-CS-Console-eff4413449dc9dfe365ded241c524fe0bab104c2.zip
Game is now working in its primitive state
Diffstat (limited to 'Space Invaders/Program.cs')
-rw-r--r--Space Invaders/Program.cs32
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