初始化方块init报错
var cur;
var init=function(doms){
********
cur=new Square() ----这里报错Uncaught ReferenceError: Square is not defined,
}
但是我square.js里有写代码:
var Square=function(){
//方块数据
this.data=[
[0,0,0,0],
[0,0,0,0],
[0,0,0,0],
[0,0,0,0]
];
//原点
this.origin={x:0,y:0}
}