@758482981 写道:
有时报错,有时又 不报错
xiaochu.rar (566.0 KB) 报错DEMO代码如下 touch:function(){
this.node.on('touchstart',function(event){//传回节点位置
cc.log('touchstart')
var p=this.node.convertToNodeSpace(event.getLocation());
var p2=this.PositionToPos(p.x,p.y);
cc.log('p',p,'p2',p2)
var cell = this.cells[p2.x][p2.y]
if(typeof(cell)=='undefined'){
return;
}
cell.active = false
cc.log(cell)
},this);
this.node.on('touchmove',function(event){
cc.log('touchmove')
},this);
this.node.on('touchend',function(event){
cc.log('touchend')
},this);},
相关 http://forum.cocos.com/t/sorry-ccsg-node-init-is-removed/40457
帖子: 2
参与者: 1