mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Adds helpers to bosses at level 2 & 3 and above in demo game
This commit is contained in:
parent
bf179674ad
commit
ceef6321eb
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user