# 클라이언트 스크립트

## 클라이언트 스크립트 <a href="#undefined" id="undefined"></a>

* 클라이언트 스크립트는 프로젝트 폴더 혹은 Scripts에 `Hello.lua`와 같은 파일 이름으로 존재해야 읽힙니다.

<table><thead><tr><th width="355">스크립트</th><th>설명</th></tr></thead><tbody><tr><td><strong>Client.width</strong></td><td>화면의 가로 크기를 가져온다.</td></tr><tr><td><strong>Client.height</strong></td><td>화면의 세로 크기를 가져온다.</td></tr><tr><td><strong>Client.ShowAlert(text, callback)</strong></td><td>알림 메시지를 띄운다.</td></tr><tr><td><strong>Client.ShowYesNoAlert(text, callback)</strong></td><td>알림 Yes/No 메시지를 띄운다.</td></tr><tr><td><strong>Client.ShowBuyItem(id, amount, callback)</strong></td><td>특정 아이템을 구매하는 메시지를 띄운다.</td></tr><tr><td><strong>Client.Quit()</strong></td><td>클라이언트를 닫는다.</td></tr><tr><td><strong>ScriptEventPublisher Client.GetTopic(topic)</strong></td><td>서버와 메시지를 주고받기 위해 특정 주제를 등록한다.</td></tr><tr><td><strong>Client.FireEvent(topic, args…)</strong></td><td>서버에게 특정 topic으로 메시지를 전송한다.</td></tr><tr><td><strong>Client.RunLater(callback, t)</strong></td><td>t초 이후에 callback 함수를 실행한다.</td></tr><tr><td><strong>Camera</strong></td><td>카메라를 컨트롤하는 객체</td></tr><tr><td><strong>Point</strong></td><td>x, y 좌표를 담은 클래스</td></tr><tr><td><strong>Rect</strong></td><td>x, y, width, height 사각형을 담은 클래스</td></tr><tr><td><strong>Image</strong></td><td>이미지를 출력하는 클래스</td></tr><tr><td><strong>Text</strong></td><td>글씨를 출력하는 클래스</td></tr><tr><td><strong>Slider</strong></td><td>조절 컨트롤러를 출력하는 클래스</td></tr><tr><td><strong>Button</strong></td><td>버튼을 출력하는 클래스</td></tr><tr><td><strong>Panel</strong></td><td>패널을 출력하는 클래스</td></tr><tr><td><strong>ScrollPanel</strong></td><td>스크롤 되는 패널을 출력하는 클래스</td></tr><tr><td><strong>GridPanel</strong></td><td>Grid로 배열되는 패널을 출력하는 클래스</td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.punkland.io/punkland/punkland-studio/script/client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
