Question

Recently I switched from Cocos2d-iPhone to Cocos2d-x. When writing Objective-C code I find NSNotificationCenter very useful in a few situations. I want to use something similar in a Cocos2d-x project written in C++.

I don't think writing my own relatively simple NotificationCenter would be too difficult. Before I re-invent the wheel I thought it appropriate to ask: What is the equivalent of NSNotificationCenter when writing C++ code that runs on Android and iOS?

Was it helpful?

Solution

There's CCNotificationCenter class in cocos2d-x.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top