Please show me how to implement a Singleton in cocos2d-x 2.2.2.
I want to create a singleton class like “SceneManager” to manage all resources( sprites ). Each sprite is created with image name, position…which are read from a Plist file.
Plist file:
Obj0
Image
background.png
Position
0,0
I use CCDictionary to read Plist file.
The crazy thing is when I run win32 project, it works fine, and when I run ios project, it doesn’t show anything, just shows a black screen. Debugging shows that it did not read Plist file successfully, nothing is read.