63 lines
2.0 KiB
Markdown
63 lines
2.0 KiB
Markdown
---
|
|
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) |
|