게임 levelComplete 메서드
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
levelComplete(
level: number
): void;
사용자가 레벨 완료 이벤트에 도달했습니다.
levelComplete
는 레벨 체계를 사용하는 게임에서 사용됩니다. 사용자가 레벨을 완료했을 때 게임에서 levelComplete
를 호출해야 합니다. 레벨에 순서가 정해져 있다면
level
은 완료된 레벨의 색인으로, 1부터 시작해야 합니다. 레벨에 순서가 없다면 level
은 0이어야 합니다. 게임에 레벨이나 주요 지점이 없는 경우 이 API를 사용하지 않아도 됩니다.
게임에 구체적인 레벨이 없는 경우에도 게임에 구체적이면서 순서가 정해져 있고 플레이어가 자연스럽게 머무는 주요 지점이 있다면 이 API를 호출할 수 있습니다. 예를 들어
게임 99 Balls 3D에서는 사용자가 성공적으로 공을 던져 맞출 때마다
levelComplete
를 호출합니다.
요구사항
- 게임에 레벨이 있는 경우 사용자가 한 레벨을 완료할 때마다 게임에서 이 메서드를 호출해야 합니다.
- 게임에 구체적인 레벨이 없는 경우에도 게임의 적절한 주요 지점에서 이 메서드를 호출하는 것이 좋습니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-12-24(UTC)
[[["이해하기 쉬움","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"]],["최종 업데이트: 2024-12-24(UTC)"],[[["`levelComplete` is an event triggered when a user successfully completes a level or milestone in a game."],["For games with ordered levels, `level` represents the index of the completed level starting from 1, for unordered levels it should be 0, and for games without levels, this API isn't necessary."],["While primarily for level-based games, `levelComplete` can also be used to mark significant progress points or successes in games without traditional levels."],["Games with levels must call this method upon level completion, while games without distinct levels should call it at appropriate success milestones."]]],[]]