> For the complete documentation index, see [llms.txt](/llms.txt)

# Currency

Manages an in-game currency balance (wallet) and the store products that sell it.




**이 데모에 대하여**

데모는 익명 계정으로 자동 로그인합니다. 이 계정은 쇼룸의 모든 데모에서 공유되므로 한 데모에서 얻은 아이템이나 재화가 다른 데모에도 반영됩니다. 로딩에 약간 시간이 걸립니다. 화면이 작다면 새 탭에서 열어 사용해 보세요.

## 개요

The page shows an in-game currency wallet and two buttons that deposit into it. GS2-Money2 keeps currency granted for free and currency the player paid for as separate balances, so you can see which balance moves depending on the button you press. Every reading and button on the page is a UI component generated from the package; no demo-specific script is involved.

## 체험 방법

1. **Your coins** shows **Free balance**, **Paid balance**, and **Total balance**.
1. Press **Deposit** under **Get coins** (labeled **Deposit 100 free coins**); **Free balance** and **Total balance** go up by 100.
1. Press **Deposit** under **Get paid coins** (labeled **Deposit 50 paid coins**); **Paid balance** and **Total balance** go up by 50. This deposit is recorded as a purchase for 120 JPY.

The wallet is shared by every showroom demo, so currency spent in other demos such as the shop is reflected in the balances here.

## 사용하는 GS2 서비스

- [GS2-Money2](/ko/microservices/money2/): A GS2-Money2 wallet holds the free and paid balances separately. A paid deposit is recorded with a price and a currency code, which keeps it apart from free deposits.
- [GS2-Exchange](/ko/microservices/exchange/): Two GS2-Exchange rates define the transactions each **Deposit** button runs to deposit into GS2-Money2, executed server-side automatically.

## GS2 Studio에서 사용하기

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

```text
https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-currency/packages/foundation-economy-currency
```

- Owner: `gs2io`
- Repository: `gs2-studio-package`
- Subdirectory: `foundation-economy-currency/packages/foundation-economy-currency`

## 소스 코드

- 데모 프로젝트: <https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-currency/live-demo>
- 기능 패키지: <https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-currency>



