当我EventListener设置:
!TOUCH_ONE_BY_ONE ,当俩个手指同时点击屏幕的时候,onTouchBegan就会进俩次,请问这是对的么?
当我EventListener设置:
!TOUCH_ALL_AT_ONCE)
,当俩个手指同时点击屏幕的时候,onTouchesBegan就还是会进俩次,且touches参数的长度分别是1,请问这是对的么?
这是TOUCH的,还有MENU的:
一个Layer上添加了俩个按钮:(如下)
var closeItem1 =
new cc.MenuItemImage(
res.CloseNormal_png,
res.CloseSelected_png,
function () {
var armature =
new ccs.Armature(“beiji”);
armature.getAnimation().playWithIndex(0);
armature.setPosition(200, 200);
armature.getAnimation().setMovementEventCallFunc(
this.animationEvent,
this);
this.addChild(armature);
},
this);
closeItem1.attr({
x: 200,
y: 20,
anchorX: 0.5,
anchorY: 0.5
});
var closeItem2 =
new cc.MenuItemImage(
res.CloseNormal_png,
res.CloseSelected_png,
function () {
var armature =
new ccs.Armature(“beiji”);
armature.getAnimation().playWithIndex(0);
armature.setPosition(300, 200);
armature.getAnimation().setMovementEventCallFunc(
this.animationEvent,
this);
this.addChild(armature);
},
this);
closeItem2.attr({
x: 300,
y: 20,
anchorX: 0.5,
anchorY: 0.5
});
var menu =
new cc.Menu(closeItem1, closeItem2);
menu.x = 0;
menu.y = 0;
this.addChild(menu, 1); 同时按下俩个按钮,TM居然同时响应了,同时播放了2个动画,请问这是对么?
求解答啊!!!!!!!!!!!!!
)