The use of ccuserdefault in cocos-2d is very simple, there is a great God on the Internet (http://blog.csdn.net/honghaier/article/details/8814551) has all commented on this class, at a glance. Thank you very much!
The following describes how to use this class as a fool
1. Introduce the header file in the class to be used
# Include "support \ ccuserdefault. H"
# Include "stdio. H"
# Include "stdlib. H"
2. Set the corresponding value
Ccuserdefault: shareduserdefault ()-& gt; setdoubleforkey ("double", 2.4 );
3. Get the corresponding data
Double D = ccuserdefault: shareduserdefault ()-> getdoubleforkey ("double ");
Some parameters are stored during the game so that some data can continue to exist during the next game, such as the amount of money. I personally think it is much easier to use than plist!
Note the location of the XML file, which is under the Debug. Win32 Directory!