Usage Limits

개요

The page shows four usage counters and two reset schedules (daily and weekly). Counters 1 to 3 follow the same daily schedule but are counted separately, while Counter 4 follows the weekly one. The maximum is supplied by the press rather than stored on the counter, so Counter 1 carries two ceilings at once: three free uses, and up to five with an ad view.

체험 방법

  1. Reset schedules shows the daily schedule, Resets every day at 00:00 UTC, and the weekly one, Resets every Monday at 00:00 UTC. Each counter’s Next reset in counts down to its next reset.
  2. Press Use free under Counter 1 (daily reset) three times; Usage reads 3 used. Free uses stop at 3, ad-backed uses at 5., and Watch an ad to use replaces Use free.
  3. Press Watch an ad to use; an Advertisement panel opens (no real ad plays). Wait 5 seconds and press I finished watching: a view point is granted and then spent on one use. At five uses Nothing left appears and no more uses are possible.
  4. Pressing Use free under Counter 2 (daily reset) leaves Counter 1’s count unchanged. Counter 2 closes at 4 uses, Counter 3 at 6, and the weekly Counter 4 (weekly reset) at 1; once closed, No free uses left appears.
  5. Press Reset every allowance under Counter 1 (daily reset) to put all four counters back to 0, instead of waiting for midnight UTC (or Monday, for Counter 4).

Counts are kept on the account shared by all showroom demos. If a counter is already closed, Reset every allowance lets you start over at any time.

사용하는 GS2 서비스

  • GS2-Limit: GS2-Limit models define the daily (00:00 UTC) and weekly (Monday 00:00 UTC) reset schedules and count four counters per player. The maximum is passed with each count-up request.
  • GS2-Exchange: GS2-Exchange rates define the transactions for a free use, an ad-backed use that also spends a view point, and resetting every counter, executed server-side atomically.
  • GS2-AdReward: Watch an ad to use spends one GS2-AdReward view point per ad-backed use. The point is granted when the view is confirmed, the same way as in the ads demo.

GS2 Studio에서 사용하기

GS2 Studio의 Simple 모드에서 Add features 를 열고 Usage Limits 의 Add 를 누르면 이 기능을 자신의 프로젝트에 가져올 수 있습니다. 패키지를 직접 지정하려면 Add from GitHub 를 선택하고 아래 패키지를 입력합니다.

https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-limit/packages/foundation-economy-limit
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: foundation-economy-limit/packages/foundation-economy-limit

소스 코드