From 499e8caf7a296012db326778a8b38483e962f178 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sun, 15 Sep 2013 17:48:29 +0800 Subject: [PATCH] [dispatcher] Updating the declare of event listeners in Layer. Using more specified type. --- cocos2dx/layers_scenes_transitions_nodes/CCLayer.h | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h index 7bf5063037..ca75eb3dd0 100644 --- a/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h +++ b/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h @@ -29,13 +29,13 @@ THE SOFTWARE. #include "base_nodes/CCNode.h" #include "CCProtocols.h" -#include "event_dispatcher/CCKeyboardEvent.h" -#include "event_dispatcher/CCTouchEvent.h" #include "cocoa/CCArray.h" #ifdef EMSCRIPTEN #include "base_nodes/CCGLBufferedNode.h" #endif // EMSCRIPTEN +#include "event_dispatcher/CCKeyboardEvent.h" + NS_CC_BEGIN /** @@ -45,6 +45,9 @@ NS_CC_BEGIN class TouchScriptHandlerEntry; +class TouchEventListener; +class KeyboardEventListener; +class AccelerationEventListener; // // Layer @@ -180,9 +183,9 @@ protected: bool _touchEnabled; bool _accelerometerEnabled; bool _keyboardEnabled; - EventListener* _touchListener; - EventListener* _keyboardListener; - EventListener* _accelerationListener; + TouchEventListener* _touchListener; + KeyboardEventListener* _keyboardListener; + AccelerationEventListener* _accelerationListener; private: Touch::DispatchMode _touchMode; bool _swallowsTouches;