Game Development Reference
In-Depth Information
The Director and cache classes
After containers comes the all-knowing Director and all-encompassing cache objects.
The Director object manages scenes and knows all about your application. You will
make calls to it to get to that information and to change some of the things such as screen
size, frame rate, scale factor, and so forth.
The caches are collector objects. The most important ones are TextureCache ,
SpriteFrameCache , and AnimationCache . These are responsible for storing key
information regarding those two important rectangles I mentioned about earlier. But every
type of data that is used repeatedly in Cocos2d-x will be kept in some sort of cache list.
Both Director and all cache objects are singletons. These are special sort of classes that
are instantiated only once; and this one instance can be accessed by any other object.
Search WWH ::




Custom Search