在Cocos2d-x 3.0中传递信息和NotificationCenter

时间:2014-06-25 14:53:26

标签: ios cocos2d-x cocos2d-x-3.0

我在我的Cocos2d-x 3.0 iOS应用中发布通知,如下所示:

Dictionary *d = Dictionary::create();
d->setObject(Integer::create(123), "someKey");
NotificationCenter::getInstance()->postNotification(someNotification, d);

这很有效。但是,我收到有关DictionaryInteger被弃用的警告。在Cocos2d-x 3.0中通过通知传递信息的首选,不推荐使用的方法是什么?

1 个答案:

答案 0 :(得分:2)