Mechanism of Loading Resources

Posted on 2013-11-23 17:09  Flex/AS Programmer  阅读(162)  评论(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


Copyright © 2024 Flex/AS Programmer
Powered by .NET 8.0 on Kubernetes