mirror of https://github.com/axmolengine/axmol.git
Merge pull request #4046 from dumganhar/ios-mac-project-fix
iOS and Mac project fix[ci skip]
This commit is contained in:
commit
9177f78e5e
|
@ -1 +1 @@
|
|||
f918efd122d7a0cfabddf411f64d954d4fcd8579
|
||||
245681d0a739a5432c0e588df5627789e03d902f
|
|
@ -1 +1 @@
|
|||
e2d62e7c366bf3a2c2bbd08ce9b482dab2aa38c4
|
||||
7d3978ce3b84a7fd50e88c4e4b6a6e5bfdc92a20
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
|
@ -37,7 +37,7 @@ THE SOFTWARE.
|
|||
#import "CCTouch.h"
|
||||
#import "CCIMEDispatcher.h"
|
||||
#import "CCWindow.h"
|
||||
#import "CCEventDispatcher.h"
|
||||
#import "CCEventDispatcherMac.h"
|
||||
#import "CCEGLView.h"
|
||||
|
||||
|
||||
|
|
|
@ -100,7 +100,10 @@ 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();
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue