After thinking for one night (if you believe), you can figure out a blog related to cocos2dx tips. It has the following features: 1. Simplified; 2. Practical; 3. occasional violence, yellow... our theme is: It doesn't matter if you don't know some tips, but it will be awesome if you know it. ------------------------------------- Enter the text below: Suppose
After thinking for one night (if you believe), you can figure out a blog related to cocos2dx tips. It has the following features: 1. Simplified; 2. Practical; 3. occasional violence, yellow... our theme is: It doesn't matter if you don't know some tips, but it will be awesome if you know it. ------------------------------------- Enter the text below: Suppose
After thinking for one night (if you believe), you can work out a blog related to cocos2dx tips. It has the following features:
1. simplified;
2. Practical;
3. occasional violence, yellow...
Our theme is: It doesn't matter if you don't know some skills, but it will be awesome if you know it.
-------------------------------------
Enter the text below:
Assume that there are many directories in the Resource of the project, such as image, fonts, Menu, and InterfaceUI. The images corresponding to the several genie that I want to create are in these directories respectively, for example:
auto sprite = Sprite::create("image/sp.png");
But what's terrible is that I have a poor memory (false). I forgot the directories where all the images are stored. At this time, I have to go to the directories to search for them. Is this very troublesome? (If you don't have any trouble, let me go out now! Out !).
There is a way to solve your troubles from the root cause, that is, to the male clinic... Well, I seem to have said something wrong. Don't care about such details. Please refer to the following:
// Add the following lines of code to the applicationDidFinishLaunching () function in Appdelegate. cpp:
Std: vector
Paths; // create a string-type container paths. push_back ("fonts"); // Add the path paths of the image directory to the container. push_back ("image"); paths. push_back ("sounds"); FileUtils: getInstance ()-> setSearchResolutionsOrder (paths); // set the path here. All we need to do is to put the created container in.
Well, I personally think this method is useful when creating small projects.
Of course, there are other ways to do this, mac... yes, it indicates that you have never used a mac. You just heard that you don't need to specify a path under the mac. You just need to throw the image name directly;
In win32, that is, VS, you can add additional directories. Of course, this has nothing to do with the topic of this article. I will not introduce it in detail.
Well, that's it. Not short enough... the amount seems to be ambiguous. Well
Http://blog.csdn.net/start530/article/details/22582207