在游戏上的敌人重生功能,但是工作我的循环似乎没有任何效果,因为我仍然只有一个ememy在屏幕上移动,感谢for循环敌人重生
Monster.prototype.draw = function() {
for (var i=0; i <5; i++){
clearMonster();
monsterCon.drawImage(sprite, this.locationX, this.locationY, this.width, this.height, this.destinationX, this.destinationY, this.width, this.height);
this.checkKeys();
}
};
'clearMonster();'是不是擦掉你的怪物? – fernandosavio 2013-04-24 22:03:02