[摘要]this.isloop){ var cell = this.cells[this.cellIndex]; ctx.drawImage(this.spritesheet , cell.x , ...
this.isloop){
var cell = this.cells[this.cellIndex];
ctx.drawImage(this.spritesheet , cell.x , cell.y , cell.w , cell.h , sprite.left-sprite.width/2 , sprite.top-sprite.width/2 , cell.w , cell.h);
} else if(this.endCallback){
this.endCallback.call(sprite);
this.cellIndex = 0;
}
}
}
//特制飞机精灵表绘制器
W.controllSpriteSheetPainter = function(cells , spritesheet){
this.cells = cells
关键词:运用HTML5 Canvas制作一个容易的打飞机游戏