• <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 之间传递音频

      Passing audio between scenes cocos2d(在场景 cocos2d 之间传递音频)
        <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 之间传递音频的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                相关文档推荐

                Hardware Volume buttons change in app volume(硬件音量按钮更改应用程序音量)
                Cocos2d - How to check for Intersection between objects in different layers(Cocos2d - 如何检查不同层中对象之间的交集)
                Highlight Read-Along Text (in a storybook type app for iPhone)(突出显示朗读文本(在 iPhone 的故事书类型应用程序中))
                Cocos2D + Disabling only Retina iPad Graphics(Cocos2D + 仅禁用 Retina iPad 图形)
                Proper cocos2d scene restart?(正确的 cocos2d 场景重启?)
                [ios.cocos2d+box2d]how to disable auto-rotation?([ios.cocos2d+box2d]如何禁用自动旋转?)
                  • <bdo id='Vv85q'></bdo><ul id='Vv85q'></ul>

                      <tbody id='Vv85q'></tbody>

                      <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>