日期:2014-05-17 浏览次数:20499 次
function main(){
this.canvas=document.getElementById("gameCanvas");
this.context=null;
if(this.canvas.getContext){
this.context=canvas.getContext("2d");
}
if(!this.context){
alert("Your browser does not support canvas.");
return;
}
this.container=document.getElementById("mainDiv");
this.cardCanvasDic=[];
this.cardCellWidth=120;
this.cardCellHeight=150;
this.cardCellSpan=20;
this.getCardPosition=function(row,column){
var _x=cardCellSpan+(column-1)*(cardCellWidth+cardCellSpan);
var _y=cardCellSpan+(row-1)*(cardCellHeight+cardCellSpan);
return {x:_x, y:_y};
};
this.DrawAbilities=function(ctx,abilities){
&nbs