Scheduling

개요

This demo shows the shared scheduling layer that answers “is this event open right now” with GS2-Schedule. Absolute schedules are fixed on the clock, so every visitor sees the same windows, and one that has ended is not listed. Relative schedules start when a player pulls a trigger, so each visitor gets a window of their own. You can pull, extend and clear the trigger with buttons and watch the window change.

체험 방법

  1. Event windows lists the schedules that are open right now. The absolute open-season (absolute) shows its Period and, under Ends in, the time left until it ends in 2031. closed-season has already ended, so it is not listed.
  2. Press Pull on happy-hour under Start your window to fire the trigger. happy-hour appears in Your trigger its Window runs 5 minutes (300 seconds) from the moment you pulled it, and Expires in counts down.
  3. At the same time, the relative schedule happy-hour (relative) appears in Event windows, with the window your trigger opened under Relative window and the time until it closes under Closes in.
  4. Each press of Extend in Your trigger adds 60 seconds to the window, and both Expires in and Closes in grow accordingly.
  5. Press Clear to remove the trigger, which closes the happy-hour window. Left alone, it expires on its own after 5 minutes.

Your account is shared by every showroom demo in the same browser, so schedules used by other demos (such as the daily guild-season, or ranking-contest if you opened it in the ranking demo) can also appear in Event windows.

사용하는 GS2 서비스

  • GS2-Schedule: GS2-Schedule holds the absolute and relative events (open-season, closed-season, happy-hour and others) and each player’s triggers, and decides whether each event is open and for how long.
  • GS2-Exchange: Free GS2-Exchange rates define the trigger pull (300-second TTL), the 60-second extension and the clear as transactions against GS2-Schedule, and each button runs one of them.

GS2 Studio에서 사용하기

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

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

소스 코드