开发者

how to pass a int class variable from one class to another class in cocos2d

I have a game class sub class of CCLayer where i declare a int variable gameScore in .h file and initialize/update this variable in .m class.Now I need show this gameScore value in another class when game is over.But i don't know 开发者_开发问答how to do it.Infact i found severarl solution but most of them didn't work for me or i can't understand them properly.So i need a simple example of doing it.


i got solution by using singleton class

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜