加入吃豆及记分

This commit is contained in:
郑浩乐
2016-01-11 21:39:55 +08:00
parent 7bce202206
commit 7be106ad7e
2 changed files with 62 additions and 20 deletions

View File

@@ -95,6 +95,12 @@ function Game(id,params){
}
return -1;
};
//设置地图上某点的值
Map.prototype.set = function(x,y,value){
if(this.data[y]){
this.data[y][x] = value;
}
};
//地图坐标转画布坐标
Map.prototype.coord2position = function(cx,cy){
return {