Small man (Bill man) Personal Original, welcome to reprint, reprint please indicate the address, small man (Bill man) column address http://blog.csdn.net/bill_man
At this point, our major knowledge points have been involved, and there are sound (the next article), followed by some small knowledge points. This time I will write about screen rotation, schduler, and get the system language.
1. Screen Rotation
You can use getdeviceorientation and setdeviceorientation to obtain the screen orientation and set the corresponding screen orientation respectively.
In this example, you can use setdeviceorientation to set the screen orientation based on the screen orientation. The usage is very simple and will not be explained too much.
2. Schedule
3. There is a method to call a function on time in the cocos2d-x. After defining this, the method will be called every time until unschduler
The following describes how to register a method called on time.
Schedule (schedule_selector (schedulerautoremove: autoremove), 0.5f );
In this way, autoremove will be called on time.
The usage of unschedule is as follows:
Unschedule (schedule_selector (schedulerautoremove: autoremove ));
In this way, autoremove will not be called. In kjava games, the thread method is often used for logic and rendering every frame. We can use schdmove to implement this approach.
Call ccschedget: sharedscheduler ()-> pausetarget (this); pause to pause all schdget
Call unscheduleallselectors (); or ccschedtors: sharedscheduler ()-> unscheduleallselectors ();
There is a fixed call method, that is, scheduleupdate will call the update method once in about 0.01 seconds (reload)
3. Obtain the System Language
The following method is used to obtain the current language of the system:
Cclanguagetype current1_agetype = ccapplication: sharedapplication (). getcurrentlanguage ();
See
Obtain the corresponding language and display it on the screen
I just started to study this engine. If there are any errors, I hope you can correct them more.
Next, write down the sound system