Mechanism of Loading Resources

Posted on 2013-11-23 17:09  Flex/AS Programmer  阅读(167)  评论(0)    收藏  举报

There are two different mechanisms of loading resources since cocos2d-2.1beta3-x-2.1.1:

  • distributed strategy
    This strategy is used in CocosBuilder. It put all retina resources into different directories. We will describe it in detail following.
  • centralized strategy
    This strategy put all retina resources into a separate directory.

Don't use two strategies together. If your project is not created by CocosBuilder. I sugget you use centralized strategy. Just use CCFileUtils::setSearchPath() (setResourceDirectory is deprecated) to set searching paths.

1. Distributed strategy

This strategy is used in cocos2d-iphone and CocosBuilder. The resource directory looks like


博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3