【问题标题】:Windows phone 8 port on cocos2d-xcocos2d-x 上的 Windows phone 8 端口
【发布时间】:2014-06-12 10:45:23
【问题描述】:

我在将 andoird 游戏移植到 cocos2d-x 上的 windows phone 8 时遇到问题。我都有以下问题

The BG music continues to play when I press WINDOWS button. 
It pauses when i press the button but after 5-10 seconds starts to play again

提前感谢您的帮助。 阿基尔拉扎

【问题讨论】:

  • 您是否正在暂停 AppDelegate 中的背景音乐和效果?
  • 我在 applicationDidEnterBackground() 中暂停背景音乐。

标签: windows-phone-8 cocos2d-x


【解决方案1】:

转到 cocos2dRenderer.cpp 找到 Disconnect() 方法。 在方法中写下这一行

mApp->applicationDidEnterBackground();

并类似地在 CreateGLResources(); 中调用以下行功能

//应该是applicationWillEnterForeground()

mApp->applicationWillEnterForeground();

希望这能解决您的问题。 祝你好运。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多