• <bdo id='DldvI'></bdo><ul id='DldvI'></ul>
    1. <i id='DldvI'><tr id='DldvI'><dt id='DldvI'><q id='DldvI'><span id='DldvI'><b id='DldvI'><form id='DldvI'><ins id='DldvI'></ins><ul id='DldvI'></ul><sub id='DldvI'></sub></form><legend id='DldvI'></legend><bdo id='DldvI'><pre id='DldvI'><center id='DldvI'></center></pre></bdo></b><th id='DldvI'></th></span></q></dt></tr></i><div id='DldvI'><tfoot id='DldvI'></tfoot><dl id='DldvI'><fieldset id='DldvI'></fieldset></dl></div>
      <legend id='DldvI'><style id='DldvI'><dir id='DldvI'><q id='DldvI'></q></dir></style></legend>

    2. <tfoot id='DldvI'></tfoot>

      <small id='DldvI'></small><noframes id='DldvI'>

      在场景 cocos2d 之间传递音频

      时间:2024-08-12
        <tbody id='r8e9y'></tbody>
        <bdo id='r8e9y'></bdo><ul id='r8e9y'></ul>
        <legend id='r8e9y'><style id='r8e9y'><dir id='r8e9y'><q id='r8e9y'></q></dir></style></legend>

          • <small id='r8e9y'></small><noframes id='r8e9y'>

          • <tfoot id='r8e9y'></tfoot>
                <i id='r8e9y'><tr id='r8e9y'><dt id='r8e9y'><q id='r8e9y'><span id='r8e9y'><b id='r8e9y'><form id='r8e9y'><ins id='r8e9y'></ins><ul id='r8e9y'></ul><sub id='r8e9y'></sub></form><legend id='r8e9y'></legend><bdo id='r8e9y'><pre id='r8e9y'><center id='r8e9y'></center></pre></bdo></b><th id='r8e9y'></th></span></q></dt></tr></i><div id='r8e9y'><tfoot id='r8e9y'></tfoot><dl id='r8e9y'><fieldset id='r8e9y'></fieldset></dl></div>
              • 本文介绍了在场景 cocos2d 之间传递音频的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                问题描述

                刚开始使用 cocos2d,到目前为止我设置了不同的场景,例如主菜单、设置和关于.我在主菜单场景中添加了一些背景音乐,如下所示:

                Just started working with cocos2d, so far ive set up different scenes eg main menu, settings and about. Ive added some background music to the main menu scene like so:

                    [[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"TileMap.caf"];
                

                音乐传递到其他场景,但当我返回主菜单场景时,声音会自行重新启动.

                The music passes through to the other scenes, but when i go back to the main menu scene the sound restarts itself.

                我现在才这样做大约 3 周,所以请放轻松 :)

                I have only been doing this about 3 weeks now, so be easy on me :)

                提前致谢.

                推荐答案

                你应该检查当前是否正在播放背景音乐 [[SimpleAudioEngine sharedEngine] isBackgroundMusicPlaying],如果它当前正在播放则什么都不做而不是在主菜单场景中再次调用 playBackgroundMusic

                you should check if background music is currently playing with [[SimpleAudioEngine sharedEngine] isBackgroundMusicPlaying], and if its currently playing just do nothing instead of calling playBackgroundMusic again in your main menu scene

                这篇关于在场景 cocos2d 之间传递音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                上一篇:cocos2d 从未来的特定时间开始粒子 下一篇:排行榜没有添加到屏幕 cocos2d

                相关文章

                • <bdo id='Vv85q'></bdo><ul id='Vv85q'></ul>

                <small id='Vv85q'></small><noframes id='Vv85q'>

                <legend id='Vv85q'><style id='Vv85q'><dir id='Vv85q'><q id='Vv85q'></q></dir></style></legend>
                1. <tfoot id='Vv85q'></tfoot>

                    <i id='Vv85q'><tr id='Vv85q'><dt id='Vv85q'><q id='Vv85q'><span id='Vv85q'><b id='Vv85q'><form id='Vv85q'><ins id='Vv85q'></ins><ul id='Vv85q'></ul><sub id='Vv85q'></sub></form><legend id='Vv85q'></legend><bdo id='Vv85q'><pre id='Vv85q'><center id='Vv85q'></center></pre></bdo></b><th id='Vv85q'></th></span></q></dt></tr></i><div id='Vv85q'><tfoot id='Vv85q'></tfoot><dl id='Vv85q'><fieldset id='Vv85q'></fieldset></dl></div>