Domanda

I am upgrading my app like others to Cocos2D 3.0 as we speak. I am having trouble though with some methods in the app.

1: I also use the accelerometer like so:

self.AccelerometerEnabled = YES; 

however this has also been changed, what is the replacement method to invoke the accelerometer?

2: Lastly I used the actionManager of Cocos2D 2.x like so:

[[[CCDirector sharedDirector] actionManager] resumeTargets:self.pauseTargets];

What is the new replacement method to call resumeTargets?

Trust me I have looked through the documentation for 3.0 and haven't found the new replacement API's for these in particular.

È stato utile?

Soluzione

1: As a simple answer, the accelerometer has been removed all together since it has been deprecated since iOS 5

2: These are needed now and the following actionManager code will work:

#import "CCDirector_Private.h"
#import "CCActionManager.h"
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top