From a8a8ef85e62ae198831bfc40bf60a0f26a9bac3f Mon Sep 17 00:00:00 2001 From: minggo Date: Thu, 17 Apr 2014 14:46:52 +0800 Subject: [PATCH] add comment for EventListenerTouchOneByOne::checkAvailable() --- cocos/2d/CCEventListenerTouch.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/2d/CCEventListenerTouch.cpp b/cocos/2d/CCEventListenerTouch.cpp index 2dbbbe8d41..4730cc7f60 100644 --- a/cocos/2d/CCEventListenerTouch.cpp +++ b/cocos/2d/CCEventListenerTouch.cpp @@ -82,6 +82,8 @@ EventListenerTouchOneByOne* EventListenerTouchOneByOne::create() bool EventListenerTouchOneByOne::checkAvailable() { + // EventDispatcher will use the return value of 'onTouchBegan' to determine whether to pass following 'move', 'end' + // message to 'EventListenerTouchOneByOne' or not. So 'onTouchBegan' needs to be set. if (onTouchBegan == nullptr) { CCASSERT(false, "Invalid EventListenerTouchOneByOne!");