add content
@ -12,14 +12,14 @@ description: Display Gamble
|
|||||||
|
|
||||||
| Device Type | Preview |
|
| Device Type | Preview |
|
||||||
|---------------|-----------------------------------------------------------------------------|
|
|---------------|-----------------------------------------------------------------------------|
|
||||||
| Desktop |  |
|
| Desktop |  |
|
||||||
| Landscape |  |
|
| Landscape |  |
|
||||||
| Portrait | <center></center>|
|
| Portrait | <center></center>|
|
||||||
|
|
||||||
|
|
||||||
## Implementation
|
## Implementation
|
||||||
|
|
||||||
### Setup
|
### Prepare Assets
|
||||||
|
|
||||||
#### Scene Hierarchy
|
#### Scene Hierarchy
|
||||||
|
|
||||||
@ -42,20 +42,21 @@ Place the node in the following scene structure:
|
|||||||
└── [gamble-loader]
|
└── [gamble-loader]
|
||||||
```
|
```
|
||||||
</td>
|
</td>
|
||||||
<td><center></center></td>
|
<td><center></center></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
---
|
---
|
||||||
|
|
||||||
### Gamble Setup
|
### Setup
|
||||||
|
|
||||||
- In node component include:
|
- In node component include:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
#### `gamble-loader`
|
#### Components
|
||||||
|
|
||||||
|
**`gamble-loader`**
|
||||||
- A component for managing the loading and unloading of gambling scenes in a game.
|
- A component for managing the loading and unloading of gambling scenes in a game.
|
||||||
|
|
||||||
| Property | Type | Description |
|
| Property | Type | Description |
|
||||||
@ -63,4 +64,19 @@ Place the node in the following scene structure:
|
|||||||
| nodeBackground | cc.Node | Background node reference |
|
| nodeBackground | cc.Node | Background node reference |
|
||||||
| sceneGamble | String | Name of the gamble scene |
|
| sceneGamble | String | Name of the gamble scene |
|
||||||
| rootGambleName | String | Root node name for the gamble scene |
|
| rootGambleName | String | Root node name for the gamble scene |
|
||||||
| rootGamble | Node | Runtime reference to the gamble root node (initialized in ctor) |
|
|
||||||
|
|
||||||
|
**`gamble-panel-mobile-scaler`**
|
||||||
|
|
||||||
|
#### Backgrounds
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
1. Use background scenes for the gamble feature:
|
||||||
|
- `gamble-background-landscape` : [Setup Background Landscape](/docs/setup-main-game/main-scene/background#2-setup-background-landscape)
|
||||||
|
|
||||||
|
- `gamble-background-portrait` : [Setup Background Portrait](/docs/setup-main-game/main-scene/background#3-setup-background-portrait)
|
||||||
|
|
||||||
|
2. trong cả node `gamble-background-landscape` and `gamble-background-portrait` đều add `orientation-ui-controller`
|
||||||
|
|
||||||
|
More info: [Node Spawner](/docs/faqs/setup-cocos-scene#node-spawner)
|
After Width: | Height: | Size: 85 KiB |
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 558 KiB After Width: | Height: | Size: 558 KiB |
Before Width: | Height: | Size: 617 KiB After Width: | Height: | Size: 617 KiB |
Before Width: | Height: | Size: 362 KiB After Width: | Height: | Size: 362 KiB |
After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 4.0 KiB |