diff --git a/examples/game/lib/game_object_factory.dart b/examples/game/lib/game_object_factory.dart index 807ae9067f3..afe0178eff4 100644 --- a/examples/game/lib/game_object_factory.dart +++ b/examples/game/lib/game_object_factory.dart @@ -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)); + } + } } }