add content gamble
This commit is contained in:
parent
3c8120de19
commit
a35ae44191
62
docs/02-setup-main-game/05-main-scene/18-Gamble.md
Normal file
62
docs/02-setup-main-game/05-main-scene/18-Gamble.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
sidebar_position: 18
|
||||
title: Gamble
|
||||
description: Display Gamble
|
||||
---
|
||||
|
||||
# Gamble
|
||||
|
||||
### Overview
|
||||
|
||||
**Gamble** in slot games is a feature that lets players risk their winnings for a chance to double (or multiply) them, usually by guessing a card color.
|
||||
|
||||
| Device Type | Preview |
|
||||
|---------------|-----------------------------------------------------------------------------|
|
||||
| Desktop |  |
|
||||
| Landscape |  |
|
||||
| Portrait | <center></center>|
|
||||
|
||||
|
||||
### Scene Hierarchy
|
||||
|
||||
Place the node in the following scene structure:
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style={{ width: "500px" }}>Path</th>
|
||||
<th style={{ width: "500px" }}>Example</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
```
|
||||
Canvas
|
||||
└── [main-view]
|
||||
└── [game-view]
|
||||
└── [gamble-loader]
|
||||
```
|
||||
</td>
|
||||
<td><center></center></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
---
|
||||
|
||||
### Gamble Setup
|
||||
|
||||
- In node component include:
|
||||
|
||||

|
||||
|
||||
#### `gamble-loader`
|
||||
|
||||
- A component for managing the loading and unloading of gambling scenes in a game.
|
||||
|
||||
| Property | Type | Description |
|
||||
|------------------|-----------|---------------------------------------------------------|
|
||||
| nodeBackground | cc.Node | Background node reference |
|
||||
| sceneGamble | String | Name of the gamble scene |
|
||||
| rootGambleName | String | Root node name for the gamble scene |
|
||||
| rootGamble | Node | Runtime reference to the gamble root node (initialized in ctor) |
|
Binary file not shown.
After Width: | Height: | Size: 39 KiB |
Binary file not shown.
After Width: | Height: | Size: 558 KiB |
Binary file not shown.
After Width: | Height: | Size: 617 KiB |
Binary file not shown.
After Width: | Height: | Size: 362 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
@ -45,4 +45,20 @@ Positions a node at a specific location when the device is in landscape / portra
|
||||
2. Set `default Position` in the Inspector.
|
||||
3. The position updates automatically in mobile landscape / portrait mode.
|
||||
|
||||

|
||||

|
||||
|
||||
## Orientation UI Controller
|
||||
|
||||
Manage UI visibility based on device orientation (landscape or portrait).
|
||||
|
||||

|
||||
|
||||
| Property | Type | Default | Description |
|
||||
|---------------------|---------|-----------|----------------------------------------------------------------------------------------------|
|
||||
| **isLandscape** | Boolean | true | Indicates if the UI should be visible in landscape mode. Automatically syncs with ***isPortrait***. |
|
||||
| **isPortrait** | Boolean | false | Indicates if the UI should be visible in portrait mode. Automatically syncs with ***isLandscape***. |
|
||||
| **useActiveObject** | Boolean | false | Visibility method:<br />- `false`: Uses opacity (0-255)<br />- `true`: Uses node active state |
|
||||
|
||||
**Notes:**
|
||||
- Automatically keeps landscape and portrait states in sync.
|
||||
- Supports both opacity and active state for controlling visibility.
|
||||
|
BIN
docs/faqs/img/orientation-ui-controller.png
Normal file
BIN
docs/faqs/img/orientation-ui-controller.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.0 KiB |
Loading…
x
Reference in New Issue
Block a user