Merge pull request #4046 from dumganhar/ios-mac-project-fix

iOS and Mac project fix[ci skip]
This commit is contained in:
James Chen 2013-11-01 00:24:08 -07:00
commit 9177f78e5e
8 changed files with 11 additions and 9 deletions

View File

@ -1 +1 @@
f918efd122d7a0cfabddf411f64d954d4fcd8579
245681d0a739a5432c0e588df5627789e03d902f

View File

@ -1 +1 @@
e2d62e7c366bf3a2c2bbd08ce9b482dab2aa38c4
7d3978ce3b84a7fd50e88c4e4b6a6e5bfdc92a20

View File

@ -25,7 +25,7 @@
#import "CCDirectorCaller.h"
#import "CCDirector.h"
#import "EAGLView.h"
#import "CCEventDispatcher.h"
#import "CCEventDispatcherMac.h"
#include "CCAutoreleasePool.h"
static id s_sharedDirectorCaller;

View File

@ -27,12 +27,11 @@
// But in case they are included, it won't be compiled.
#import <Availability.h>
#import "CCEventDispatcher.h"
#import "CCEventDispatcherMac.h"
#import "ccConfig.h"
#include "utlist.h"
#include "CCDirector.h"
#include "platform/mac/CCEventDispatcher.h"
//NS_CC_BEGIN;
static CCEventDispatcher *sharedDispatcher = nil;

View File

@ -37,7 +37,7 @@ THE SOFTWARE.
#import "CCTouch.h"
#import "CCIMEDispatcher.h"
#import "CCWindow.h"
#import "CCEventDispatcher.h"
#import "CCEventDispatcherMac.h"
#import "CCEGLView.h"

View File

@ -100,8 +100,11 @@ bool HelloWorld::init()
this->schedule( schedule_selector(HelloWorld::gameLogic), 1.0 );
this->setTouchEnabled(true);
auto dispatcher = Director::getInstance()->getEventDispatcher();
auto listener = EventListenerTouchAllAtOnce::create();
listener->onTouchesEnded = CC_CALLBACK_2(HelloWorld::onTouchesEnded, this);
dispatcher->addEventListenerWithSceneGraphPriority(listener, this);
_targets = new Array();
_targets->init();

View File

@ -30,7 +30,7 @@ public:
void updateGame(float dt);
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event) override;
void onTouchesEnded(const std::vector<cocos2d::Touch*>& touches, cocos2d::Event* event);
protected: