Cocos2D - userData property for sprite -
I am developing an iPhone game app using Cocos 2D.
I find that this is an excellent solution to the perfection of the straight property for my situation:
sprite.userData = 123;
However, Phantom UserData can only store one piece data. If I need to collect three pieces of data, then what is the best way to do this?
'userData' is actually a zero pointer that does not hold the 'node' class:
zero * userData_; As such it can point to any data structure or class (or C function).
Comments
Post a Comment