2025-06-12 18:19:55 +07:00

74 lines
3.5 KiB
Markdown

---
sidebar_position: 8
title: Free Round
description: Display and manage remaining free rounds in the game.
---
# Free Round System
## Overview
The **Free Round** system manages the display and logic for tracking remaining free rounds with fixed bet in the game, supporting both desktop and mobile platforms.
- **International theme popup**
![Free Round International](../img/05-main-scene/freeround-counter/freerounds-international.png)
- **Chinese theme popup**
![Free Round Chinese](../img/05-main-scene/freeround-counter/freerounds-chinese.png)
| Platform | Preview |
|----------|---------|
| Desktop | ![Desktop Free Round](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile | ![Mobile Free Round](../img/05-main-scene/freeround-counter/overview-freeround.png) |
## Asset Preparation
- **Core Assets**:
- Path: `assets/core-assets/hyper-core/packages/freeround-count-box/prefabs`
- ![Core Prefabs](../img/05-main-scene/freeround-counter/freeround-path-prefabs.png)
- **Game Assets**:
- Path: `assets/game-assets/prefabs`
- ![Game Prefabs](../img/05-main-scene/freeround-counter/freeround-path-prefabs-in-game.png)
## Setup
1. **General Configuration**:
- Ensure script references correct nodes.
- ![General Setup](../img/05-main-scene/freeround-counter/freeround-counter-general.png)
- Properties:
| Property | Description |
|----------|-------------|
| `duration` | Duration of fade in/out animation (seconds). |
| `content` | Container node for the counter. |
| `labelLeft` | Label showing remaining free rounds. |
- ![Settings](../img/05-main-scene/freeround-counter/freeround-counter-setting-general.png)
2. **Platform Setup**:
- **Desktop**:
- Add `Platform-ui-controller` component.
- ![Desktop Setup](../img/05-main-scene/freeround-counter/freeround-counter-setup-desktop.png)
- **Mobile**:
- Add `Platform-ui-controller` and `UI Mobile Position` components.
- ![Mobile Setup](../img/05-main-scene/freeround-counter/freeround-counter-setup-mobile.png)
3. **Asset Setup**:
- **Desktop**:
- Path: `assets/game-assets/textures/desktop/preloads/main-game/custom-scale`
- ![Desktop Assets](../img/05-main-scene/freeround-counter/assets-freeround-desktop.png)
- **Mobile**:
- Path: `assets/game-assets/textures/mobile/preloads/main-game/custom-scale`
- ![Mobile Assets](../img/05-main-scene/freeround-counter/assets-freeround-mobile.png)
- **Common**:
- Free Round Background: ![Background Asset](../img/05-main-scene/freeround-counter/assets-freeround-background.png)
4. **Font Setup**:
- ![Font Setup](../img/05-main-scene/freeround-counter/add-font.png)
**Tip**:
- Follow game design for position and size.
- Use separate textures for Desktop and Mobile.
- Ensure the main scene includes the popup panel ([See Popup Panel Guide](/docs/setup-main-game/main-scene/popup-panel#multiple-popup-panel)).
## Game Result Example
| Platform | Popup | Action | Result |
|----------|-------|--------|--------|
| Desktop | ![Popup Desktop](../img/05-main-scene/freeround-counter/freerounds-international.png) | Click → Start | ![Result Desktop](../img/05-main-scene/freeround-counter/overview-freeround-desktop.png) |
| Mobile | ![Popup Mobile](../img/05-main-scene/freeround-counter/freerounds-international.png) | Click → Start | ![Result Mobile](../img/05-main-scene/freeround-counter/overview-freeround.png) |
![TotalWin](../img/05-main-scene/freeround-counter/total-win-freerounds.png)