Commit ceef6321 authored by Viktor Lidholt's avatar Viktor Lidholt

Adds helpers to bosses at level 2 & 3 and above in demo game

parent bf179674
......@@ -46,11 +46,29 @@ class GameObjectFactory {
}
void addBossFight(int l, double yPos) {
// Add boss
EnemyBoss boss = new EnemyBoss(this);
Point pos = new Point(0.0, yPos + _chunkSpacing / 2.0);
addGameObject(boss, pos);
playerState.boss = boss;
// Add boss's helpers
if (l >= 1) {
EnemyDestroyer destroyer0 = new EnemyDestroyer(this);
addGameObject(destroyer0, new Point(-80.0, yPos + _chunkSpacing / 2.0 + 70.0));
EnemyDestroyer destroyer1 = new EnemyDestroyer(this);
addGameObject(destroyer1, new Point(80.0, yPos + _chunkSpacing / 2.0 + 70.0));
if (l >= 2) {
EnemyDestroyer destroyer0 = new EnemyDestroyer(this);
addGameObject(destroyer0, new Point(-80.0, yPos + _chunkSpacing / 2.0 - 70.0));
EnemyDestroyer destroyer1 = new EnemyDestroyer(this);
addGameObject(destroyer1, new Point(80.0, yPos + _chunkSpacing / 2.0 - 70.0));
}
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment