Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #108 #109

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix issue #108 #109

wants to merge 4 commits into from

Conversation

hasyimibhar
Copy link

When the scene is transitioning in, if the user touches on the screen, ccTouchesBegan is not called, but ccTouchesMoved is called. This causes a NSRangeException to be thrown, because _touches is empty. I added a simple workaround to ensure that ccTouchesMoved will never get called unless ccTouchesBegan is called first.

@psineur
Copy link
Contributor

psineur commented Apr 28, 2012

Why did you add an instance variable as a flag, instead of using simple check right in touchesMoved method?

Отправлено с iPhone

28.04.2012, в 12:17, fishcakereply@reply.github.com написал(а):

When the scene is transitioning in, if the user touches on the screen, ccTouchesBegan is not called, but ccTouchesMoved is called. This causes a NSRangeException to be thrown, because _touches is empty. I added a simple workaround to ensure that ccTouchesMoved will never get called unless ccTouchesBegan is called first.

You can merge this Pull Request by running:

git pull https://github.com/fishcake/cocos2d-iphone-extensions master

Or you can view, comment on it, or merge it online at:

#109

-- Commit Summary --

-- File Changes --

M Extensions/CCLayerPanZoom/CCLayerPanZoom.h (2)
M Extensions/CCLayerPanZoom/CCLayerPanZoom.m (17)

-- Patch Links --

https://github.com/cocos2d/cocos2d-iphone-extensions/pull/109.patch
https://github.com/cocos2d/cocos2d-iphone-extensions/pull/109.diff


Reply to this email directly or view it on GitHub:
#109

@hasyimibhar
Copy link
Author

Hmm, you mean check if _touches is empty? Whoops, I didn't think about that. :P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants