Login Rewards

개요

This demo shows a seven-day login bonus built on GS2-LoginReward. Each Receive once a day pays that day’s coins into your wallet and marks the day Received under Seven days. The day turns over at 15:00 UTC (midnight in Japan), but a button moves your clock forward a day so you can claim the next one right away.

체험 방법

  1. Press Receive under Daily bonus to claim Day 1: 10 coins; Free balance under Where the coins land goes up by 10. Day 1 in Seven days is marked Received, and Last received shows when (in UTC).
  2. Press Receive again the same day; it is refused because today has already been claimed.
  3. Press Advance one day to move your clock on GS2 forward 24 hours (see Demo clock), then Receive claims the next day (Day 2 pays 20 coins).
  4. Keep going and Day 7 pays 100 coins. Repeat is off, so Receive is refused after the seventh day.
  5. Press Start over to delete your receive status and begin again from Day 1.

Advance one day changes your account’s time offset. The account is shared by every showroom demo in the same browser, so the moved clock carries over to the other demos too.

사용하는 GS2 서비스

  • GS2-LoginReward: The GS2-LoginReward bonus daily defines a seven-day track (10, 20, 30, 40, 50, 60 and 100 coins) in streaming mode, turning over at 15:00 UTC, with repeat and missed-day relief off, and keeps each player’s receive status.
  • GS2-Money2: Each day’s reward is deposited as free currency into a GS2-Money2 wallet (slot 0), shown as Free balance.
  • GS2-Exchange: A free GS2-Exchange rate defines deleting the receive status (DeleteReceiveStatusByUserId), run by Start over.

GS2 Studio에서 사용하기

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

https://github.com/gs2io/gs2-studio-package/tree/main/micro-economy-login-reward/packages/micro-economy-login-reward
  • Owner: gs2io
  • Repository: gs2-studio-package
  • Subdirectory: micro-economy-login-reward/packages/micro-economy-login-reward

소스 코드