适用于游戏的 ready 方法
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
ready(): void;
表示游戏已加载完毕,用户可以开始玩了。
当游戏的主菜单(而非加载屏幕)显示出来并且可以互动时,游戏就应调用 ready
。您可使用此调用来隐藏加载屏幕或指示图标。此时,您的游戏(或至少是第一关)应该已加载完毕。
要求
- 当游戏已准备好接受用户互动时,游戏就必须调用此方法。具体可以是主菜单或核心游戏内容本身做好了准备。
- 如果仍有不可互动的元素(例如启动画面或加载屏幕)正在向用户展示,此时游戏就不得调用此方法。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-24。
[[["易于理解","easyToUnderstand","thumb-up"],["解决了我的问题","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["没有我需要的信息","missingTheInformationINeed","thumb-down"],["太复杂/步骤太多","tooComplicatedTooManySteps","thumb-down"],["内容需要更新","outOfDate","thumb-down"],["翻译问题","translationIssue","thumb-down"],["示例/代码问题","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["最后更新时间 (UTC):2024-12-24。"],[[["`ready()` signals that the game has finished loading and is ready for user interaction, such as at a main menu or the start of gameplay."],["This method must be called when the displayed content is interactive, not during loading screens or splash screens."],["Games should ensure the first level or main menu is loaded before calling `ready()`, indicating readiness for immediate gameplay or menu navigation."]]],[]]