You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 12, 2023. It is now read-only.
Chanyoung Park edited this page Mar 27, 2020
·
44 revisions
개요
모듈은 스크립트 작성자에게 제공되는 라이브러리이다.
게임에 필요하지만 스크립트로 처리하기 난해한 기능들을 모듈화하여 플러그인 내부에 구현하였다.
예를 들면 게임 리소스를 불러오거나, 구조물을 생성하거나, 인벤토리를 복구하는 모듈도 있다.
일부 모듈은 함수가 공개되어 있으므로 스크립트에서 이를 조작하여 각 게임 특성에 맞출 수 있다.
스케줄러: 어떤 시점에서 일련의 코드를 일정 주기로 반복 실행하거나, 지정된 시간에 맞추어 실행하는 기능을 제공한다.
사용자 정의 스크립트 함수 호출
이벤트 모듈
버킷 이벤트, 게임 이벤트를 모니터링하는 함수를 등록한다.
스크립트 예시
// 게임 참가 이벤트 모니터링 시작EventModule.attachMonitor("PlayerJoinGameEvent", { event->
event.getPlayer().sendMessage("Welcome to this game lobby!")
})
EventModule.attachMonitor("GameStartEvent", { event->GameModule.broadcast("Let the game begin!")
// 게임 참가 이벤트 모니터링 종료EventModule.detachMonitor("PlayerJoinGameEvent")
})