Merge pull request 'feature/add-jackpot-panel' (#40) from feature/add-jackpot-panel into develop
Reviewed-on: #40
@ -1,11 +1,86 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 15
|
sidebar_position: 15
|
||||||
---
|
---
|
||||||
|
|
||||||
# Jackpot Setup
|
# Jackpot Setup
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
|
- **Jackpot Feature** is a system where there are **multiple levels (tiers)** of prizes, usually increasing in value. This structure gives players a chance to win **smaller jackpots more frequently**, while still keeping a large top prize available.
|
||||||
|
|
||||||
|
| Tier | Description | Preview |
|
||||||
|
|-------|------------------------------|------------------------------------------------------------|
|
||||||
|
| Grand | The top prize, very rare <br />and often worth thousands <br />or even millions(especially if it's progressive)| |
|
||||||
|
| Major | A significant prize, harder to win. |  |
|
||||||
|
| Minor | A bit higher in value, still fairly common. |  |
|
||||||
|
| Mini | The smallest and easiest to win. |  |
|
||||||
|
|
||||||
|
- The panel is responsive and supports both desktop and mobile layouts:
|
||||||
|
|
||||||
|
| Orientation | Preview |
|
||||||
|
|-------------|------------------------------------------------------------|
|
||||||
|
| Desktop |  |
|
||||||
|
| Mobile |  |
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
|
||||||
|
### Core Prefabs
|
||||||
|
|
||||||
|
- Use the prefabs located at:
|
||||||
|
|
||||||
|
|`assets/core-assets/jackpot-package/prefabs`||
|
||||||
|
|--------------------------------------------|--------------------------------------------------------------------|
|
||||||
|
|
||||||
|
### Setup Steps
|
||||||
|
|
||||||
|
#### Desktop
|
||||||
|
|
||||||
|
- Add the jackpot prefab to your main scene.
|
||||||
|
- Set its position to **(0, 0)**.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
More info: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner)
|
||||||
|
|
||||||
|
#### Mobile
|
||||||
|
|
||||||
|
- Configure the jackpot node for both landscape and portrait orientations.
|
||||||
|
- Use `UI Mobile Position` for a responsive layout.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
More info: [UI Mobile Position](http://localhost:3000/docs/faqs/setup-cocos-scene#ui-mobile-landscape--portrait--position)
|
||||||
|
|
||||||
|
- Example using `Platform Node Spawner`:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
More info: [Platform Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#platform-node-spawner)
|
||||||
|
|
||||||
|
### Result
|
||||||
|
|
||||||
|
- The jackpot panel works seamlessly across all platforms and orientations.
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
More info: [Node Spawner](http://localhost:3000/docs/faqs/setup-cocos-scene#node-spawner)
|
||||||
|
|
||||||
|
:::tip
|
||||||
|
**Sibling Index Order:**
|
||||||
|
| Node Name | Sibling Index | Notes |
|
||||||
|
|----------------------------------------|---------------|---------------------------------------|
|
||||||
|
| `jackpot-runner-panel-desktop-spawner` | Lowest | Usually at the bottom |
|
||||||
|
| `container-jackpot-runner-mobile` | Middle | Between desktop and result panels |
|
||||||
|
| `jackpot-result-panel-spawner` | Highest | Always on top <br />  |
|
||||||
|
:::
|
||||||
|
|
||||||
|
|
||||||
|
## Game Result Examples
|
||||||
|
|
||||||
|
| Win Tier | Example |
|
||||||
|
|----------|------------------------------------------------------------------|
|
||||||
|
| Grand |  |
|
||||||
|
| Major |  |
|
||||||
|
| Minor |  |
|
||||||
|
| Mini |  |
|
||||||
|
After Width: | Height: | Size: 8.2 KiB |
After Width: | Height: | Size: 240 KiB |
After Width: | Height: | Size: 326 KiB |
After Width: | Height: | Size: 44 KiB |
After Width: | Height: | Size: 26 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 32 KiB |
After Width: | Height: | Size: 331 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 326 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 327 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 190 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 6.4 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 36 KiB |
@ -22,3 +22,27 @@ Use this configuration to control which prefabs appear based on the current plat
|
|||||||
|--------------------|----------------------|-----------------------------------------------|
|
|--------------------|----------------------|-----------------------------------------------|
|
||||||
| **Desktop Toggle** | ✅ Enabled | Show node on desktop |
|
| **Desktop Toggle** | ✅ Enabled | Show node on desktop |
|
||||||
| **Mobile Toggle** | ❌ Disabled | Hide node on mobile |
|
| **Mobile Toggle** | ❌ Disabled | Hide node on mobile |
|
||||||
|
|
||||||
|
|
||||||
|
## Node Spawner
|
||||||
|
|
||||||
|
Spawns a prefab at the same position as the original node and then removes the node.
|
||||||
|
|
||||||
|
#### Usage
|
||||||
|
|
||||||
|
- On scene start, the prefab replaces the node.
|
||||||
|
1. Attach the script to a placeholder node.
|
||||||
|
2. Set the `prefab` property in the Inspector.
|
||||||
|
|
||||||
|
|
||||||
|
## UI Mobile Landscape / Portrait Position
|
||||||
|
|
||||||
|
Positions a node at a specific location when the device is in landscape / portrait mode on mobile.
|
||||||
|
|
||||||
|
#### Usage
|
||||||
|
|
||||||
|
1. Attach the script to your node.
|
||||||
|
2. Set `default Position` in the Inspector.
|
||||||
|
3. The position updates automatically in mobile landscape / portrait mode.
|
||||||
|
|
||||||
|

|
BIN
docs/faqs/img/default-setting.png
Normal file
After Width: | Height: | Size: 1.1 KiB |