Game Development Reference
In-Depth Information
Figure 14-11. The enemies in a field battle
When creating a boss, the addBoss method is called, which is shown in Listing 14-24.
Listing 14-24. Game.js - Adding the Boss to the Final Level
p.addBoss = function () {
var boss;
this.enemies = []
this.enemyHolder = new createjs.Container();
this.enemyHolder.x = this.bossPos.x;
this.enemyHolder.y = this.bossPos.y;
boss = new game.Enemy(this.levelData.boss);
Search WWH ::




Custom Search