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

This commit is contained in:
Viktor Lidholt 2015-09-03 16:40:49 -07:00
parent bf179674ad
commit ceef6321eb

View File

@ -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));
}
}
}
}