August 7, light rain. "The crow cries scattered Yu ping empty, a pillow new cool a fan." Sleep autumn, no place, full-scale Indus Moon Ming. "
The previous article has allowed the plane to move freely with the finger , this post loads bullets and sound and background music.
Some of the functions to be used in this article are explained:
First, the cocos2d sound, background music functions are as follows:
1,soundengine.sharedengine (). PlaySound (Context ctxt, int Res Id, boolean loop)
Used to play background music.
2, Soundengine.sharedengine (). Playeffect (Context app,int resId)
for playing sound effects , such as bullets shooting, collisions, explosions and other musical effects .
3 . SoundEngine.sharedEngine().realesAllSounds();
SoundEngine.sharedEngine().realesAllEffects(); 清理所有的音效-Clean everything up
SoundEngine.purgeSharedEngine();
         Turn off the sound system completely - completely Shut down the sound system
二、单线程的定时器schedule
schedule(String selector,float interval)
第二个参数的意思是,每隔多少秒执行一次函数,记住,单位是秒。