Hello everyone,
This is driving me crazy, I’ve spent many days trying everything I can think of… Code is much more complicated but here is the compact version below: touch.getLocation is crashing the app (android/ios) after a few minutes play pressing some buttons quickly. Especially on faster phones!
When the line is removed, it does not crash.
Anyone has any suggestions?
var myTouchLoc=null;
cc.eventManager.addListener({
event:cc.EventListener.TOUCH_ONE_BY_ONE,
swallowTouches:false,
onTouchBegan:function(touch,event){return true;},
onTouchMoved:function(touch,event){
myTouchLoc=touch.getLocation(); //when I remove this line, no more crashes!
return false;
}
},myLayer); //myLayer is always on the screen, never removed.