zoukankan      html  css  js  c++  java
  • CocosCreator原生平台退出游戏,暂停和继续

    原生平台退出游戏,方法为:
    cc.director.end();
    官方解释:End the life of director in the next frame
    暂停游戏,方法:
    cc.director.pause();
    官方解释:暂停正在运行的场景,该暂停只会停止游戏逻辑执行,但是不会停止渲染和 UI 响应。 如果想要更彻底得暂停游戏,包含渲染,音频和事件,请使用 Game.pause。
    注:cc.director.isPaused()返回值为布尔类型,可用于判断。
    cc.director.resume();
    恢复暂停场景的游戏逻辑,如果当前场景没有暂停将不发生任何事情。

  • 相关阅读:
    快速模幂
    UPC-2249 曲线分割【递推】
    maven 服务器
    maven repo
    php-fpm sock
    mysql
    go 1
    xdebug
    centos
    win10 2503 2502
  • 原文地址:https://www.cnblogs.com/allyh/p/9520884.html
Copyright © 2011-2022 走看看