Hi,
I am developing the game uisng cocos-2d 0.8v.
I am not getting that how to enabled MultiTouch for the Layer?
Please advise.
How to Enabled MultiTouch in cocos-2d 0.8v?
(4 posts) (2 voices)-
Posted 1 year ago #
-
self.isTouchEnabled = YES; - in init method
and implement touch handlers:
-(void) ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event;
-(void) ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;You'll get a set of touches and you can handle its.
Posted 1 year ago # -
Thanks inhibitor,
I have set isTouchEnabled= TRUE ;
But consider the following case having two touch
1. I touch my ship object to move the ship.
2. Simultaneously while moving the ship and after some delay I touches on the screen to fire the bullet.
The bullet can not fired.
So in debugging, I observed that, the "ccTouchBegan" method could not called.Please advise how to handle this situation.
Posted 1 year ago # -
The above is not case with cocos-2d 0.99 version.
Posted 1 year ago #
Reply
You must log in to post.