Compare commits

..

No commits in common. "develop" and "master" have entirely different histories.

689 changed files with 0 additions and 28728 deletions

View File

@ -1,25 +0,0 @@
# Website
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
### Installation
```
$ npm install
```
### Local Development
```
$ npm start
```
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
### Build
```
$ npm build
```
This command generates static content into the `build` directory and can be served using any static contents hosting service.

View File

@ -1,16 +0,0 @@
---
id: intro
sidebar_position: 0
---
# Slot Game API
## Slot Game Machine
* [Initialize](category/initialize)
* [Balance](category/balance)
* [Bet](category/bet)
* [Spin](category/spin)
* [After Spin](category/after-spin)
* [Present Feature Trigger](category/present-feature-trigger)
* [Auto Spin](category/after-spin)
* [Take Or Gamble](category/take-or-gamble)

View File

@ -1,17 +0,0 @@
{
"position": 1,
"label": "Slot Game Machine",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Slot Game Machine",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"development environment"
]
}
}

View File

@ -1,18 +0,0 @@
{
"position": 5,
"label": "After Spin",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "After Spin",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"afterspin"
]
}
}

View File

@ -1,19 +0,0 @@
---
sidebar_position: 1
---
# After Spin Controller
## Index
### Methods
* [transitionToNextState](#transitiontonextstate) Check the condition and move to the next state.
## Details
#### transitionToNextState
> Check the condition and move to the next state.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/after-spin-controller.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/after-spin-controller.js#L21)|

View File

@ -1,5 +0,0 @@
---
sidebar_position: 2
---
# After Spin Model

View File

@ -1,5 +0,0 @@
---
sidebar_position: 3
---
# After Spin View

View File

@ -1,18 +0,0 @@
{
"position": 15,
"label": "Auto Spin",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Auto Spin",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"auto-spin"
]
}
}

View File

@ -1,353 +0,0 @@
---
sidebar_position: 1
---
# Auto Spin Controller
## Index
### Properties
* [totalBet](#totalbet) `Number` Total current bet in a spin round.
* [totalWin](#totalwin) `Number` Total win points collected.
* [betLossAccumulation](#betlossaccumulation) `Number` Accumulated loss for checking loss limit condition.
### Methods
* [onSpinStarted](#onspinstarted) Decrements remaining auto spins and disables auto spin if none are left.
* [onRoundEnd](#onroundend) Triggers win/loss limit checks at end of round.
* [onTake](#ontake) Triggers win/loss limit checks when a take action occurs.
* [onFreeroundsTriggered](#onfreeroundstriggered) Stops auto spin if freerounds are triggered.
* [onPresentFreeroundsWinStarted](#onpresentfreeroundswinstarted) Stops auto spin on freeround win presentation.
* [onMiniGameStarted](#onminigamestarted) Stops auto spin if a mini-game starts.
* [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
* [onAutoSpinActivated](#onautospinactivated) Activates auto spin mode.
* [onAutoSpinDeactivated](#onautospindeactivated) Disables auto spin and resets `betLossAccumulation`.
* [onAutoSpinQuantityChanged](#onautospinquantitychanged) Updates number of auto spins remaining.
* [onFeatureTrigger](#onfeaturetrigger) Stops auto spin if feature is triggered and `stopOnFeatureTrigger` is enabled.
* [onStopOnTriggerFeatureToggled](#onstopontriggerfeaturetoggled) Toggles stop-on-feature behavior.
* [onLossLimitToggled](#onlosslimittoggled) Enables/disables auto-spin stop based on loss limit.
* [onLossLimitValueChanged](#onlosslimitvaluechanged) Updates configured loss limit value.
* [onWinLimitToggled](#onwinlimittoggled) Enables or disables win limit mode.
* [onWinLimitValueChanged](#onwinlimitvaluechanged) Updates win limit threshold.
* [onLobbyForcePauseGame](#onlobbyforcepausegame) Immediately stops auto spin when lobby forces pause.
* [onLobbyAllowResumeGame](#onlobbyallowresumegame) No action defined.
* [onDisconnected](#ondisconnected) Stops auto spin due to network disconnect.
* [onError](#onerror) Stops auto spin when error occurs.
* [onErrorAllowContinue](#onerrorallowcontinue) Stops auto spin when recoverable error is received.
* [stopAutoSpin](#stopautospin) Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
---
## Details
### Properties
#### totalBet
> Total current bet in a spin round.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L12)|
---
#### totalWin
> Total win points collected.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L13)|
---
#### betLossAccumulation
> Accumulated loss for checking loss limit condition.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L14)|
---
### Methods
#### onSpinStarted
Decrements remaining auto spins and disables auto spin if none are left.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L43](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L43)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
</p>
---
#### onRoundEnd
Triggers win/loss limit checks at end of round.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L55)|
---
#### onTake
Triggers win/loss limit checks when a take action occurs.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L61)|
---
#### onFreeroundsTriggered
Stops auto spin if freerounds are triggered.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L88](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L88)|
---
#### onPresentFreeroundsWinStarted
Stops auto spin on freeround win presentation.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L94](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L94)|
---
#### onMiniGameStarted
Stops auto spin if a mini-game starts.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L100](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L100)|
---
#### onBetDataChanged
Updates internal bet tracking based on input data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L106](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L106)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `betData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
</p>
---
#### onAutoSpinActivated
Activates auto spin mode.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L112](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L112)|
---
#### onAutoSpinDeactivated
Disables auto spin and resets `betLossAccumulation` .
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L118](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L118)|
---
#### onAutoSpinQuantityChanged
Updates number of auto spins remaining.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L125](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L125)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
</p>
---
#### onFeatureTrigger
Stops auto spin if:
* A free spin is triggered.
* The `stopOnFeatureTrigger` option in the UI is enabled in the model.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L131](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L131)|
---
#### onStopOnTriggerFeatureToggled
Toggles stop-on-feature behavior.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L139](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L139)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
</p>
---
#### onLossLimitToggled
Enables/disables auto-spin stop based on loss limit.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L145](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L145)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
</p>
---
#### onLossLimitValueChanged
Updates configured loss limit value.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L151](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L151)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `lossLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
</p>
---
#### onWinLimitToggled
Enables or disables win limit mode.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L157](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L157)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
</p>
---
#### onWinLimitValueChanged
Updates win limit threshold.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L163](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L163)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `winLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
</p>
---
#### onLobbyForcePauseGame
Immediately stops auto spin when lobby forces pause.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L169](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L169)|
---
#### onLobbyAllowResumeGame
No action defined. Placeholder handler.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L174](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L174)|
---
#### onDisconnected
Stops auto spin due to network disconnect.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L176](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L176)|
---
#### onError
Stops auto spin when error occurs.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L181](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L181)|
---
#### onErrorAllowContinue
Stops auto spin when recoverable error is received.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L186](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L186)|
---
#### stopAutoSpin
Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L191](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L191)|

View File

@ -1,307 +0,0 @@
---
sidebar_position: 2
---
# Auto Spin Model
## Index
### Properties
- [autoSpinLeft](#autospinleft) `Number` Remaining number of auto spins.
- [isAutoSpin](#isautospin) `Boolean` Indicates whether auto spin is active.
- [isStopOnFeatureTrigger](#isstoponfeaturetrigger) `Boolean` Whether to stop auto spin on feature trigger.
- [winLimit](#winlimit) `Number` Win threshold for stopping auto spin.
- [isWinLimitActive](#iswinlimitactive) `Boolean` Indicates whether win limit tracking is enabled.
- [lossLimit](#losslimit) `Number` Loss threshold for stopping auto spin.
- [isLossLimitActive](#islosslimitactive) `Boolean` Indicates whether loss limit tracking is enabled.
### Methods
- [SetAutoSpinLeft](#setautospinleft) Sets remaining number of auto spins.
- [GetAutoSpinLeft](#getautospinleft) Gets remaining number of auto spins.
- [SetIsAutoSpin](#setisautospin) Activates or deactivates auto spin.
- [GetIsAutoSpin](#getisautospin) Returns the current auto spin status.
- [SetIsStopOnFeatureTrigger](#setisstoponfeaturetrigger) Sets whether auto spin should stop on feature trigger.
- [GetIsStopOnFeatureTrigger](#getisstoponfeaturetrigger) Gets stop-on-feature-trigger status.
- [SetIsLossLimitActive](#setislosslimitactive) Enables or disables loss limit tracking.
- [GetIsLossLimitActive](#getislosslimitactive) Returns whether loss limit is active.
- [SetLossLimit](#setlosslimit) Sets the loss limit value.
- [GetLossLimit](#getlosslimit) Gets the current loss limit value.
- [SetIsWinLimitActive](#setiswinlimitactive) Enables or disables win limit tracking.
- [GetIsWinLimitActive](#getiswinlimitactive) Returns whether win limit is active.
- [SetWinLimit](#setwinlimit) Sets the win limit value.
- [GetWinLimit](#getwinlimit) Gets the current win limit value.
---
## Details
### Properties
#### autoSpinLeft
> Remaining number of auto spins.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L9)|
---
#### isAutoSpin
> Indicates whether auto spin is active.
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L10)|
---
#### isStopOnFeatureTrigger
> Whether to stop auto spin on feature trigger.
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L11)|
---
#### winLimit
> Win threshold for stopping auto spin.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L12)|
---
#### isWinLimitActive
> Indicates whether win limit tracking is enabled.
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L13)|
---
#### lossLimit
> Loss threshold for stopping auto spin.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L14)|
---
#### isLossLimitActive
> Indicates whether loss limit tracking is enabled.
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L15)|
---
### Methods
#### SetAutoSpinLeft
Sets remaining number of auto spins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L20](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L20)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `autoSpinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
---
#### GetAutoSpinLeft
Gets remaining number of auto spins
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L26)|
---
#### SetIsAutoSpin
Activates or deactivates auto spin
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L32)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `isAutoSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
---
#### GetIsAutoSpin
Returns the current auto spin status.
| meta | description |
| :--- | :---------- |
| Returns | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L38)|
---
#### SetIsStopOnFeatureTrigger
Sets whether auto spin should stop on feature trigger.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#44)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `isActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
---
#### GetIsStopOnFeatureTrigger
Gets stop-on-feature-trigger status
| meta | description |
| :--- | :---------- |
| Returns | Boolean |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#50)|
---
#### SetIsLossLimitActive
Enables or disables loss limit tracking.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#56)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `isLossLimitActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
---
#### GetIsLossLimitActive
Returns whether loss limit is active
| meta | description |
| :--- | :---------- |
| Returns | Boolean |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#62)|
---
#### SetLossLimit
Sets the loss limit value.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L68)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `lossLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
---
#### GetLossLimit
Gets the current loss limit value.
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L74)|
---
#### SetIsWinLimitActive
Enables or disables win limit tracking
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L80)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `isWinLimitActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
---
#### GetIsWinLimitActive
Returns whether win limit is active.
| meta | description |
| :--- | :---------- |
| Returns | Boolean |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L86](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L86)|
---
#### SetWinLimit
Sets the win limit value.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L92)
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `winLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
---
#### GetWinLimit
Gets the current win limit value.
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L98)

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Auto Spin view
## Overview
* AutoSpinView is a view class for the spin feature in the slot game. It extends the base View class and is intended to handle the visual representation and UI logic for spins.
## Description:
* Initializes a new instance of AutoSpinView.
* Calls the base View constructor.
* [p4f-game-core/src/view/auto-spin-view.js:5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/auto-spin-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 2,
"label": "Balance",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Balance",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"balance"
]
}
}

View File

@ -1,176 +0,0 @@
---
sidebar_position: 1
---
# Balance Controller
## Index
### Properties
* [savedCurrentPoint](#savedcurrentpoint) `Number` The current played bet.
* [savedFreePoint](#savedfreepoint) `Number` The current free point played bet.
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming.
### Methods
* [onReplayHistoryClient](#onreplayhistoryclient) Indicates the game current state is resuming.
* [onResume](#onresume) Indicates the game current state is resuming.
* [onResumeEnd](#isresumeend) Indicates the game current state isn't resuming.
* [onDeposit](#ondeposit) Update the client balance when user deposit.
* [onConnected](#onconnected) Update the client balance when the game is connected.
* [onStartGame](#onstartgame) Show the client balance when the game is started.
* [onCollectDataReceived](#oncollectdatareceived)Update the client balance when the game is collected.
* [onBalanceDataReceived](#onbalancedatareceived) Update the client balance when get new balance data.
* [onBalanceChangeRateClicked](#onbalancechangerateclicked) Change the client balance rate.
* [updateBalance](#updatebalance) Update the client balance.
* [notifyBalance](#notifyblance) Notify the client balance.
* [placeBet](#placebet) Set current client bet.
* [clearBet](#clearbet) Clear current client bet<br/><br/>
* [onSpinStart](#onspinstart) Update the client balance when user spin.
* [onReplayHistory](#onreplayhistory) Indicates the game current state is resuming.
* [onReplayHistoryEnd](#onreplayhistoryend) Indicates the game current state isn't resuming.
* [onFastPlayDataReceived](#onfastokaydatareceived) Update the client balance when user playing Fast Play.
## Details
#### savedCurrentPoint
> The current played bet.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L12)|
#### savedFreePoint
> The current free point played bet.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:13](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L13)|
#### isResume
> Indicates whether the game state is not resumed.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L14)|
#### onReplayHistoryClient
> Indicates the game current state is resuming.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:28](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L28)|
#### onResume
> Indicates the game current state is resuming.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L36)|
#### onResumeEnd
> Indicates the game current state isn't resuming.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L44)|
#### onDeposit
> Update the client balance when user deposit.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:52](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L52)|
#### onConnected
> Update the client balance when the game is connected.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:82](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L82)|
#### onStartGame
> Show the client balance when the game is started.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:90](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L90)|
#### onCollectDataReceived
> Update the client balance when the game is collected.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:99](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L99)|
#### onBalanceDataReceived
> Update the client balance when get new balance data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:109](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L109)|
#### onBalanceChangeRateClicked
> Change the client balance rate.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:117](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L117)|
#### updateBalance
> Update the client balance.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L129)|
#### notifyBalance
> Notify the client balance.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:141](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L141)|
#### placeBet
> Set current client bet.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:151](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L151)|
#### clearBet
> Clear current client bet.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/controller/balance-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L180)|
#### onSpinStart
> Update the client balance when user spin.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L17)|
#### onReplayHistory
> Indicates the game current state is resuming.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L29)|
#### onReplayHistoryEnd
>Indicates the game current state isn't resuming.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L37)|
#### onFastPlayDataReceived
> Update the client balance.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L45)|

View File

@ -1,80 +0,0 @@
---
sidebar_position: 2
---
# Balance Model
## Index
### Properties
* [currentPoint](#currentpoint) `Number` The current point.
* [freePoint](#freepoint) `Number` The current free point.
### Methods
* [SetCurrentPoint](#setcurrentpoint) Set the current point.
* [GetCurrentPoint](#getcurrentpoint) Get the current point.
* [SetFreePoint](#setfreepoint) Set the current free point.
* [GetFreePoint](#getfreepoint) Get the current free point.
* [GetAvailablePoint](#getavalablepoint) Get the current point.
* [isNumber](#isnumber) Indicates whether the value is number.
## Details
#### currentPoint
> The current point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-game-core/src/model/balance-model.js:8](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
#### freePoint
> The current free point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-game-core/src/model/balance-model.js:9](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
#### SetCurrentPoint
> Set the current point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/model/balance-model.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L14)|
#### GetCurrentPoint
> Get the current point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/model/balance-model.js:21](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L21)|
#### SetFreePoint
> Set the current free point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/model/balance-model.js:27](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L27)|
#### GetFreePoint
> Get the current free point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/model/balance-model.js:34](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L34)|
#### GetAvailablePoint
> Get the current point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/model/balance-model.js:40](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L40)|
#### isNumber
> Indicates whether the value is number.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-game-core/src/model/balance-model.js:46](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L46)|

View File

@ -1,19 +0,0 @@
---
sidebar_position: 3
---
# Balance View
## Index
### Methods
* [BalanceChangeRate](#balancechangerate) Called when get new balance data.
## Details
#### BalanceChangeRate
> Called when get new balance data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-game-core/src/view/balance-view.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/view/balance-view.js#L11)|

View File

@ -1,18 +0,0 @@
{
"position": 3,
"label": "Bet",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Bet",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"bet"
]
}
}

View File

@ -1,332 +0,0 @@
---
sidebar_position: 1
---
# Bet Controller
## Index
### Properties
* [isHistoryActivated](#ishistoryactivated) `Boolean` Indicates whether the game current state is resuming.
* [availablePoint](#availablepoint) `Number` User's current point.
* [waiterAutoSpin](#waiterautospin) `Timer` Base class actions that do have a finite time duration.
* [betProcessorFactory](#betprocessorfactory) `BetProcessorFactory` Bet Processor Factory.
* [betProcessor](#betprocessor) `BetProcessor` Current bet processor.
### Methods
* [CalculateTotalBet](#calculatetotalbet) Current total bet.
* [onChangeBetMode](#onchangebetmode) Change bet mode.
* [getClampedBet](#getclampedbet) The maximum bet that can be placed.
* [_start](#_start) Initialize some logic which need to be called the game enters the Bet State.
* [_registerEvent](#_registerevent) Register events.
* [_complete](#_complete) Called when the game exits the Bet State.
* [setBetPoints](#setbetpoints) Set the bet points.
* [setBetPoint](#setbetpoint) Set the bet point.
* [notifyBetDataChanged](#notifybetdatachanged) Notify the bet data is changed.
* [onAutoSpinDeactivated](#onautospindeactivated) Progress the bet data when the user stop auto spin.
* [onBetArrayReceived](#onbetarrayreceived) Progress the bet data get the bet array data.
* [onBetMultiplierReceived](#onbetmultiplierreceived) Progress the bet data when get the bet multiplier data.
* [onFreeroundsStarted](#onfreeroundsstarted) Progress the bet data when the free rounds start.
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Progress the bet data when get the free rounds data.
* [onMiniGameDataReceived](#onminigamedatareceived) Progress the bet data when get the mini game data.
* [onResumeOrReplayGameRound](#onresumeorreplaygameround) Progress the bet data when resume the game.
* [onBalanceChanged](#onbalancechanged) Progress the bet data when the balance change.
* [onReplayHistoryClient](#onreplayhistoryclient) Progress the bet data when replay the game.
* [onResume](#onresume) Progress the bet data when resume the game.
* [onReplayHistory](#onreplayhistory) Progress the bet data when replay the game.
* [onHistoryActivated](#onhistoryactivated) Progress the bet data when replay the game.
* [onHistoryDeactivated](#onhistorydeactivated) Progress the bet data when replay the game.
* [onStartGame](#onstartgame) Process the bet data when the game is started.
* [onAutoSpinActivated](#onautospinactivated) Change the current game state to the Spin State.
* [onSpinClicked](#onspinclicked) Change the current game state to the Spin State.
* [onOutcomeSelected](#onoutcomeselected) Set the outcome data.
* [onBetPointChanged](#onbetpointchanged) Progress the bet point.
* [onBetMultiplierChanged](#onbetmultiplierchanged) Process the bet multiplier.
* [onPaylineCountChanged](#onpaylinecountchanged) Process the bet data when the pay line is changed.
* [getTotalBetPoint](#gettotalbetpoint) Get total bet point.
* [spin](#spin) Process bet data and notify event Spin.
* [onManualBuyBonusOpened](#onmanualbuybonusopened) Process the bet data when the user buy bonus.
* [onManualBuyBonusClosed](#onmanualbuybonusclosed) Process the bet data when the user buy bonus.
* [onManualBuyBonusChanged](#onmanualbuybonuschanged) Process the bet data when the user buy bonus.
* [setBetByPowerPlayModel](#setbetbypowerplaymodel) Process the bet data when the user buy bonus.
## Details
#### isHistoryActivated
> Indicates whether the game current state is resuming.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L35)|
#### availablePoint
> User's current point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L36)|
#### waiterAutoSpin
> Base class actions that do have a finite time duration.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Timer](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/helper/timer.js#L4) |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L37)|
#### betProcessorFactory
> Bet Processor Factory.<br/>
| meta | description |
| :--- | :---------- |
| Type | [BetProcessorFactory](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L8) |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L38)|
#### betProcessor
> Current bet processor.<br/>
| meta | description |
| :--- | :---------- |
| Type | [BetProcessor](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L30) |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:39](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L39)|
#### CalculateTotalBet
> Current total bet.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L44)|
#### onChangeBetMode
> Change bet mode.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L54)|
#### getClampedBet
> The maximum bet that can be placed.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:64](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L64)|
#### _start
> Initialize some logic which need to be called the game enters the Bet State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L77)|
#### _registerevent
> Register events.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:112](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L112)|
#### _complete
> Called when the game exits the Bet State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L129)|
#### setBetPoints
> Set the bet points.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:139](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L139)|
#### setBetPoint
> Set the bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:149](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L149)|
#### notifyBetDataChanged
> Notify the bet data is changed.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:156](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L156)|
#### onAutoSpinDeactivated
> Process the bet data when the user stop auto spin.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L180)|
#### onBetArrayReceived
> Progress the bet data when get the bet array data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:197](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L197)|
#### onBetMultiplierReceived
> Progress the bet data when get the bet multiplier data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:209](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L209)|
#### onFreeroundsStarted
> Progress the bet data when the free rounds start.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:216](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L216)|
#### onFreeroundsDataReceived
> Progress the bet data when get the free rounds data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:223](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#223)|
#### onMiniGameDataReceived
> Progress the bet data when get the mini game data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:234](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L234)|
#### onResumeOrReplayGameRound
> Progress the bet data when resume the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:245](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L245)|
#### onBalanceChanged
> Progress the bet data when the balance change.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:254](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L254)|
#### onReplayHistoryClient
> Progress the bet data when replay the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:263](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L263)|
#### onResume
> Progress the bet data when resume the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:269](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L269)|
#### onReplayHistory
> Progress the bet data when replay the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:275](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L275)|
#### onHistoryActivated
> Progress the bet data when replay the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:281](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L281)|
#### onHistoryDeactivated
> Progress the bet data when replay the game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:287](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L287)|
#### onAutoSpinActivated
> Change the current game state to the Spin State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:309](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L309)|
#### onSpinClicked
> Change the current game state to the Spin State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:153](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L315)|
#### onOutcomeSelected
> Set the outcome data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:321](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L321)|
#### onBetPointChanged
> Progress the bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:327](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L327)|
#### onBetMultiplierChanged
> Process the bet multiplier.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:333](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L333)|
#### onPaylineCountChanged
> Process the bet data when the pay line is changed.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:341](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L341)|
#### getTotalBetPoint
> Get the total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:349](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L349)|
#### spin
> Process bet data and notify event Spin.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:360](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L360)|
#### onManualBuyBonusOpened
> Process the bet data when the user buy bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:375](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L375)|
#### onManualBuyBonusClosed
> Process the bet data when the user buy bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:381](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L381)|
#### onManualBuyBonusChanged
> Process the bet data when the user buy bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:386](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L386)|
#### setBetByPowerPlayModel
> Process the bet data when the user buy bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:391](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L391)|

View File

@ -1,288 +0,0 @@
---
sidebar_position: 2
---
# Bet Model
## Index
### Properties
* [betPoints](#betpoints) `Array` The current the bet points.
* [availableBetPoints](#availablebetpoints) `Array` The current available bet points that user can place.
* [betPoint](#betpoint) `Number` The current bet point.
* [minBetPoint](#minbetpoint) `Number` The current min bet point.
* [savedBetPoint](#savedbetpoint) `Number` The current save point.
* [betMultiplier](#betmultiplier) `Number` The current bet multiplier.
* [paylineCount](#paylinecount) `Number` The current Pay Linecount.
* [totalBetPoint](#totalbetpoint) `Number` The current total bet point.
* [isBuyBonusActivated](#isbuybonusactivated) `Boolean` Indicates whether the user is buying a bonus.
* [isFastPlayActivated](#isfastplayactivated) `Boolean` Indicates whether the user is playing fast play.
* [outcome](#outcome) `Object` The current outcome.
### Methods
* [SetBuyBonusActivated](#setbuybonusactivated) Set whether the user is buying a bonus.
* [CheckBuyBonusActivated](#checkbuybonusactivated) Check whether the user is buying a bonus.
* [SetFastPlayActivated](#setfastplayactivated) Set whether the user is playing fast play.
* [CheckFastPlayActivated](#checkfastplayactivated) Check whether the user is playing fast play.
* [SetOutcome](#setoutcome) Set the outcome data.
* [SetBetPoints](#setbetpoints) Set the bet points.
* [GetBetPoints](#getbetpoints) Get the bet points.
* [SetBetPoint](#setbetpoints) Set the bet point.
* [GetBetPoint](#getbetpoints) Get the bet point.
* [SetMinTotalBet](#setbetpoints) Set the min total bet point.
* [GetMinTotalBet](#getbetpoints) Get the min total bet point.
* [SetAvailableBetPoints](#setbetpoints) Set the available bet points.
* [GetAvailableBetPoints](#getbetpoints) Get the available bet points.
* [SaveBetPoint](#savebetpoint) Save the bet point.
* [GetSavedBetPoint](#getsavedbetpoint) Get the saved bet point.
* [SetBetMultiplier](#setbetmultiplier) Set the bet multiplier.
* [GetBetMultiplier](#getbetmultiplier) Get the bet multiplier.
* [SetPaylineCount](#setpaylinecount) Set the payline count.
* [GetPaylineCount](#getpaylinecount) Get the payline count.
* [SetTotalBetPoint ](#Settotalbetpoint) Save the total bet point.
* [GetTotalBetPoint ](#gettotalbetpoint) Get the total bet point.
## Details
#### betPoints
> The current the bet points.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L11)|
#### availableBetPoints
> The current available bet points that user can place.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L12)|
#### betPoint
> The current bet point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L13)|
#### minBetPoint
> The current min bet point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L14)|
#### savedbetPoint
> The current save point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L15)|
#### betMultiplier
> The current bet multiplier.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L16)|
#### payLineCount
> The current Pay Linecount.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L17)|
#### totalBetPoint
> The current total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L18)|
#### isBuyBonusActivated
> Indicates whether the user is buying a bonus.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:19](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L19)|
#### isFastPlayActivated
> Indicates whether the user is playing fast play.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:20](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L20)|
#### outCome
> The current outcome.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L21)|
#### SetBuyBonusActivated
> Set whether the user is buying a bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L26)|
#### CheckBuyBonusActivated
> Check whether the user is buying a bonus.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L32)|
#### SetFastPlayActivated
> Set whether the user is playing fast play.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L38)|
#### CheckFastPlayActivated
> Check whether the user is playing fast play.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L44)|
#### SetOutcome
> Set the outcome data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L50)|
#### GetOutcome
> Get the outcome data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L56)|
#### SetBetPoints
> Set the bet points.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L62)|
#### GetBetPoints
> Get bet points<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L68)|
#### SetBetPoint
> Set the bet point<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L98)|
#### GetBetPoint
> Get the bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:104](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L104)|
#### SetMinTotalBet
> Set the min total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L74)|
#### GetMinTotalBet
> Get the min total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L80)|
#### SetAvailableBetPoints
> Set the available bet points.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:86](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L86)|
#### GetAvailableBetPoints
> Get the available bet points.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L92)|
#### SaveBetPoint
> Set the bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:110](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L110)|
#### GetSavedBetPoint
> Get the saved bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:116](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L116)|
#### SetBetMultiplier
> Set the bet multiplier.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:122](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L122)|
#### GetBetMultiplier
> Get the bet multiplier.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:128](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L128)|
#### SetPaylineCount
> Set the payline count.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:134](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L134)|
#### GetPaylineCount
> Get the payline count.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:141](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L141)|
#### SetTotalBetPoint
> Set the total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:147](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L147)|
#### GetTotalBetPoint
> Get the total bet point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bet-model.js:153](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L153)|

View File

@ -1,19 +0,0 @@
---
sidebar_position: 3
---
# Bet View
## Index
### Methods
* [RefreshView](#refreshview)
## Details
#### RefreshView
> ...
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/bet-view.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/bet-view.js#L13)|

View File

@ -1,18 +0,0 @@
{
"position": 26,
"label": "Bonus Game",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Bonus Game",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"bonus game"
]
}
}

View File

@ -1,122 +0,0 @@
---
sidebar_position: 1
---
# Bonus Game Controller
## Index
### Methods
* [registerEvent](#registerevent) Registers bonus game related events.
* [unregisterEvent](#unregisterevent) Unregisters bonus game related events.
* [onEnterBonus](#onenterbonus) Handles entry into the bonus game.
* [onBonusReady](#onbonusready) Called when bonus game is ready to start.
* [onBonusDataReceived](#onbonusdatareceived) Handles data received from the server for bonus game.
* [setStartBonusData](#setstartbonusdata) Initializes model with starting bonus data.
* [startBonusGame](#startbonusgame) Starts the bonus game.
* [endBonusGame](#endbonusgame) Ends the bonus game and notifies results.
* [requestBonus](#requestbonus) Sends the bonus selection to the game controller.
* [setBonusData](#setbonusdata) Sets bonus data in the model.
---
## Details
### registerEvent
Registers bonus game related events
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L17) |
---
### unregisterEvent
Unregisters bonus game related events.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L26) |
---
### onEnterBonus
Handles entry into the bonus game.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L35) |
---
### onBonusReady
Called when bonus game is ready to start.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L43](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L43) |
---
### onBonusDataReceived
Handles data received from the server for bonus
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L51](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L51) |
---
### setStartBonusData
Initializes model with starting bonus data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L59) |
---
### startBonusGame
Starts the bonus game.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L73](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L73) |
---
### endBonusGame
Ends the bonus game and notifies results.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L79](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L79) |
---
### requestBonus
Sends the bonus selection to the game controller.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L90](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L90) |
---
### setBonusData
Sets bonus data in the model.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L99](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L99) |

View File

@ -1,235 +0,0 @@
---
sidebar_position: 2
---
# Bonus Game Model
## Index
### Properties
* [random](#random) `Object` Stores RNG outcome data.
* [bonusData](#bonusdata) `Object` Stores bonus game result details.
* [currentSelectionItem](#currentselectionitem) `Number` Index of current selected item.
* [lifePoint](#lifepoint) `Number` Remaining life in the bonus game.
* [type](#type) `Number` Type of bonus game.
### Methods
* [SetRandom](#setrandom) Sets the random number.
* [GetRandom](#getrandom) Returns the stored random data.
* [SetLifePoint](#setlifepoint) Sets the number of remaining life points.
* [GetLifePoint](#getlifepoint) Returns the current life points.
* [SetType](#settype) Sets the bonus game type.
* [GetType](#gettype) Returns the current type.
* [SetCurrentSelectionItem](#setcurrentselectionitem) Sets the index of the selected item.
* [GetCurrentSelectionItem](#getcurrentselectionitem) Returns the selected item index.
* [SetBonusData](#setbonusdata) Sets the bonus data object.
* [GetBonusData](#getbonusdata) Gets the full bonus data object.
* [GetTotalWinPoint](#gettotalwinpoint) Returns total win points from bonus data.
* [CheckBonusEnd](#checkbonusend) Checks if bonus game has ended.
* [GetResultData](#getresultdata) Returns the current turn result data.
* [GetBonusTurnItem](#getbonusturnitem) Returns the selected item for current bonus turn.
* [GetBonusTurnWinPoint](#getbonusturnwinpoint) Returns the win point of current bonus turn.
* [GetBonusTurnLifePoint](#getbonusturnlifepoint) Returns the life point remaining for current bonus turn.
* [GetBonusTurnPayout](#getbonusturnpayout) Returns the payout of the current bonus turn.
---
## Details
### Properties
#### random
> Stores RNG outcome data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L9) |
#### bonusData
> Stores bonus game result details.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L10) |
#### currentSelectionItem
> Index of current selected item.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L11) |
### Methods
#### SetRandom
Sets the random number.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L18) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `random` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetRandom
Returns the stored random data.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L24) |
#### SetLifePoint
Sets the number of remaining life points.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L30) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `lifePoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetLifePoint
Returns the current life points.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L36) |
#### SetType
Sets the bonus game type.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L42) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `type` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
</p>
#### GetType
Returns the current type.
| meta | description |
| :--- | :---------- |
| Returns | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L48](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L48) |
#### SetCurrentSelectionItem
Sets the index of the selected item.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L54) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `selectionIndex` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### GetCurrentSelectionItem
Returns the selected item index.
| meta | description |
| :--- | :---------- |
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L60](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L60) |
#### SetBonusData
Sets the bonus data object.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L66](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L66) |
#### GetBonusData
Gets the full bonus data object.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L72](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L72) |
#### GetTotalWinPoint
Returns total win points from bonus data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L78](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L78) |
#### CheckBonusEnd
Checks if bonus game has ended.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L84](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L84) |
#### GetResultData
Returns the current turn result data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L90](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L90) |
#### GetBonusTurnItem
Returns the selected item for current bonus turn.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L96](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L96) |
#### GetBonusTurnWinPoint
Returns the win point of current bonus turn.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L102](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L102) |
#### GetBonusTurnLifePoint
Returns the life point remaining for current bonus turn.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L111](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L111) |
#### GetBonusTurnPayout
Returns the payout of the current bonus turn.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L114](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L114) |

View File

@ -1,14 +0,0 @@
---
sidebar_position: 3
---
# Bonus Game View
## Overview
Creates a new instance of the `BonusGameView`. It inherits functionality from the `View` class of `P4FCore`.
## Description:
* Initializes a new instance of BonusGameView.
* Calls the base View constructor.
* [p4f-slotty-core/src/view/bonus-game-view.js#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/bonus-game-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 36,
"label": "End Round",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "End Round",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"end-round"
]
}
}

View File

@ -1,69 +0,0 @@
---
sidebar_position: 1
---
# End Round Controller
## Index
### Methods
* [_registerEvent](#_registerevent) Registers the required network event listeners.
* [_unregisterEvent](#_unregisterevent) Unregisters previously attached network event listeners.
* [_start](#_start) Starts the controller logic to wait for round end and trigger collect.
* [onCollectDataReceived](#oncollectdatareceived) Handles data received from network when collect is ready.
* [autoTransitionNextState](#autotransitionnextstate) Moves the game to next state or round-over depending on result.
---
## Details
### Methods
#### _registerEvent
Registers the required network event listeners.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L15) |
---
#### _unregisterEvent
Unregisters previously attached network event listeners.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L21) |
---
#### _start
Starts the controller logic to wait for round end and trigger collect.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L27](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L27) |
---
#### onCollectDataReceived
Handles data received from network when collect is ready. Triggers automatic state transition.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L37) |
---
#### autoTransitionNextState
Moves the game to next state or round-over depending on result.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L42) |

View File

@ -1,17 +0,0 @@
---
sidebar_position: 2
---
# EndRoundModel
## Overview
`EndRoundModel` is a model class for managing the end-of-round logic in the slot machine game. It extends the base model class and is responsible for handling the visual representation and UI logic related to the end of a spin.
## Description
* Initializes a new instance of `EndRoundModel`.
* Calls the base model constructor.
* Handles end-of-round events and updates the UI accordingly.
[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5)

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# EndRoundView
## Overview
EndRoundView is a UI component for managing the end-of-round visuals in the slot machine game. It extends the base View class, providing logic and presentation for the spin completion state.
## Description
* Constructs a new EndRoundView instance.
* Invokes the base View constructor for initialization.
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 28,
"label": "Free Game",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Free Game",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"free-game"
]
}
}

View File

@ -1,113 +0,0 @@
---
sidebar_position: 1
---
# Free Game Controller
## Index
### Methods
* [registerEvent](#registerevent) Registers event listeners for free spin events.
* [unregisterEvent](#unregisterevent) Unregisters event listeners.
* [onNextScrollDataReceived](#onnextscrolldatareceived) Handles incoming scroll data from server.
* [onPickupItemReceived](#onpickupitemreceived) Processes item pickups related to free spins.
* [onEnterFreeSpin](#onenterfreespin) Enters free spin mode and prepares for gameplay.
* [onFreeSpinReady](#onfreespinready) Starts free spin after validation and delay.
* [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles feature game start from user action.
* [startFreeSpin](#startfreespin) Initiates free spin logic and notifies spin.
* [setFreeGameData](#setfreegamedata) Updates model with new free spin data.
---
## Details
### Methods
#### registerEvent
Registers event listeners for free spin events.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L23) |
---
#### unregisterEvent
Unregisters event listeners.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L32) |
---
#### onNextScrollDataReceived
Processes scroll data and updates free game if not handled elsewhere.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L41) |
---
#### onPickupItemReceived
Handles item pickup and sets free game state accordingly.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L49](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L49) |
---
#### onEnterFreeSpin
Enters free spin mode and prepares for gameplay.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L57) |
---
#### onFreeSpinReady
Starts free spin after validation and delay.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L65) |
---
#### onStartFeatureGameClicked
Handles feature game start from user action.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L74) |
---
#### startFreeSpin
Initiates free spin logic and notifies spin.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L82](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L82) |
---
#### setFreeGameData
Updates model with new free spin data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L95](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L95) |

View File

@ -1,91 +0,0 @@
---
sidebar_position: 2
---
# Free Game Model
## Index
### Methods
* [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins.
* [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins.
* [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play.
* [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins.
* [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already.
* [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session.
* [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins.
---
## Details
### Methods
#### SetTotalFreeSpin
Sets the total number of free spins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L16) |
---
#### GetTotalFreeSpin
Retrieves the total number of free spins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L22) |
---
#### SetFreeSpinLeft
Sets how many free spins are left to play.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L26) |
---
#### GetFreeSpinLeft
Gets the number of remaining free spins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L32) |
---
#### GetFreeSpinPlayed
Calculates the number of spins that have been played already.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L36) |
---
#### SetFreeSpinBoost
Sets the boost/multiplier for the free spin session.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L40) |
---
#### GetFreeSpinBoost
Gets the current boost/multiplier for free spins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L46](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L46) |

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Free Game View
## Overview
The `FreeGameView` class manages the presentation layer for the Free Game feature. It handles the UI transitions and animations when entering the Free Game mode during gameplay.
## Description
* Constructs a new FreeroundsView instance.
* Invokes the base View constructor for initialization.
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/free-game-view.js#L6)

View File

@ -1,18 +0,0 @@
{
"position": 24,
"label": "Freeround Game",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Freeround Game",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"freeround-game"
]
}
}

View File

@ -1,234 +0,0 @@
---
sidebar_position: 1
---
# Freerounds Controller
## Index
### Properties
### Methods
* [_start](#_start) Initializes freerounds session and presents appropriate dialogs based on state.
* [_complete](#_complete) Clears timers and unregisters auto-spin deactivation events.
* [_registerEvent](#_registerevent) Registers relevant network and game events.
* [presentDialog](#presentdialog) Displays appropriate freerounds dialog based on configuration.
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Handles incoming freerounds data and updates model.
* [onFreeroundsTotalWinPointReceived](#onfreeroundstotalwinpointreceived) Updates model with total win points.
* [onSelectFreeroundsDataReceived](#onselectfreeroundsdatareceived) Processes selected freerounds data.
* [onFreeroundsReadyToPlay](#onfreeroundsreadytoplay) Continues the game when ready.
* [onStartFreeroundsClicked](#onstartfreeroundsclicked) Handles player clicking to start freerounds.
* [onSkipFreeroundsClicked](#onskipfreeroundsclicked) Skips the current freerounds selection screen.
* [onHideFreeroundsWinClicked](#onhidefreeroundswinclicked) Finalizes win screen and resets related states.
* [onAutoSpinActivated](#onautospinactivated) Triggers spin automatically if conditions met.
* [onSpinClicked](#onspinclicked) Triggers spin on user interaction.
* [onAutoSpinDeactivated](#onautospindeactivated) Stops any auto-spin delay timers.
* [selectFreeroundsCompleted](#selectfreeroundscompleted) Finalizes selection and initializes freerounds session.
* [continue](#continue) Determines game flow after selection or spin completion.
* [spin](#spin) Executes one spin of the freeround feature.
## Details
### Properties
### Methods
#### _start
Initializes freerounds session and presents appropriate dialogs based on state
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L22) |
#### _complete
Clears timers and unregisters auto-spin deactivation events.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L40) |
#### _registerEvent
Registers relevant network and game events.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L47) |
#### presentDialog
Displays appropriate freerounds dialog based on configuration.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L59) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `freeroundsData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `spinPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `allowChangeOptions` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
#### onFreeroundsDataReceived
Handles incoming freerounds data and updates model.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L83](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L83) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `spinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `freeroundsID` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### onFreeroundsTotalWinPointReceived
Updates model with total win points.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L98) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
`totalWinPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### onSelectFreeroundsDataReceived
Processes selected freerounds data.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L106](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L106) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
`data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### onFreeroundsReadyToPlay
Continues the game when ready.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L114](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L114) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
`data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### onStartFreeroundsClicked
Handles player clicking to start freerounds.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L122](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L122) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
`optionIndex` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### onSkipFreeroundsClicked
Skips the current freerounds selection screen.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L136](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L136) |
#### onHideFreeroundsWinClicked
Finalizes win screen and resets related states.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L145](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L145) |
#### onAutoSpinActivated
Triggers spin automatically if conditions met.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L164](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L164) |
#### onSpinClicked
Triggers spin on user interaction.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L172](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L172) |
#### onAutoSpinDeactivated
Stops any auto-spin delay timers.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L180](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L180) |
#### selectFreeroundsCompleted
Finalizes selection and initializes freerounds session.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L191](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L191) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `freeroundsData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `freeroundsID` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `spinCount` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `spinPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### continue
Determines game flow after selection or spin completion.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L214](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L214) |
#### spin
Executes one spin of the freeround feature.
| meta | description |
|:-----|:------------|
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L227](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L227) |

View File

@ -1,258 +0,0 @@
---
sidebar_position: 2
---
# Freerounds Model
## Index
### Properties
* [arrFreeroundsData](#arrfreeroundsdata) Stores the list of available freerounds data.
* [betPoint](#betpoint) Current bet point used in the freerounds.
* [freeroundsID](#freeroundsid) Identifier of the current freerounds session.
* [totalFreerounds](#totalfreerounds) Total number of freerounds awarded.
* [freeroundsPlayed](#freeroundsplayed) Number of freerounds already played.
* [totalWinPoint](#totalwinpoint) Accumulated win points from freerounds.
### Methods
* [SetArrayFreeroundsData](#setarrayfreeroundsdata) Stores an array of freerounds data.
* [GetFreeroundsData](#getfreeroundsdata) Retrieves the first item from the freerounds data array.
* [ShiftFreeroundsData](#shiftfreeroundsdata) Removes and returns the first element from the freerounds data array.
* [SetFreeroundsID](#setfreeroundsid) Sets the freerounds session ID.
* [GetFreeroundsID](#getfreeroundsid) Retrieves the current freerounds session ID.
* [SetBetPoint](#setbetpoint) Sets the bet point value.
* [GetBetPoint](#getbetpoint) Gets the current bet point value.
* [SetTotalFreerounds](#settotalfreerounds) Sets the total number of freerounds available.
* [GetTotalFreerounds](#gettotalfreerounds) Gets the total number of freerounds.
* [SetFreeroundsPlayed](#setfreeroundsplayed) Sets the number of freerounds that have been played.
* [GetFreeroundsPlayed](#getfreeroundsplayed) Gets the number of freerounds played.
* [CheckFreeroundsCompleted](#checkfreeroundscompleted) Checks whether all freerounds have been completed.
* [SetTotalWinPoint](#settotalwinpoint) Sets the total accumulated win points.
* [GetTotalWinPoint](#gettotalwinpoint) Gets the total win points earned in freerounds.
* [GetFreeroundsLeft](#getfreeroundsleft) Calculates how many freerounds are remaining.
## Details
### Properties
#### arrFreeroundsData
> Stores the list of available freerounds data.
| meta | description |
|------|-------|
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L7](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L7) |
#### betPoint
> Current bet point used in the freerounds.
| meta | description |
|------|--------|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L8) |
#### freeroundsID
> Identifier of the current freerounds session.
| meta | description |
|------|--------|
| Type | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L9) |
#### totalFreerounds
> Total number of freerounds awarded.
| meta | description |
|------|--------|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L10) |
#### freeroundsPlayed
> Number of freerounds already played.
| meta | description |
|------|--------|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L11) |
#### totalWinPoint
> Accumulated win points from freerounds.
| meta | description |
|------|--------|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L12) |
### Methods
#### SetArrayFreeroundsData
Stores an array of freerounds data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L13) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `arrFreeroundsData` [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
</p>
#### GetFreeroundsData
Retrieves the first item from the freerounds data array.
| meta | description |
| :--- | :---------- |
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L17) |
#### ShiftFreeroundsData
Removes and returns the first element from the freerounds data array.
| meta | description |
| :--- | :---------- |
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L21) |
#### SetFreeroundsID
Sets the freerounds session ID.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L25](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L25) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `freeroundsID` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
</p>
#### GetFreeroundsID
Retrieves the current freerounds session ID.
| meta | description |
| :--- | :---------- |
| Returns | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L29) |
#### SetBetPoint
Sets the bet point value.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L33](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L33) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetBetPoint
Gets the current bet point value.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L37) |
#### SetTotalFreerounds
Sets the total number of freerounds available.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L41) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalFreerounds` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetTotalFreerounds
Gets the total number of freerounds.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L45) |
#### SetFreeroundsPlayed
Sets the number of freerounds that have been played.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L49](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L49) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `freeroundsPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetFreeroundsPlayed
Gets the number of freerounds played.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L53](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L53) |
#### CheckFreeroundsCompleted
Checks whether all freerounds have been completed.
| meta | description |
| :--- | :---------- |
| Returns | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L57) |
#### SetTotalWinPoint
Sets the total accumulated win points.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L61) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalWinPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetTotalWinPoint
Gets the total win points earned in freerounds.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L65) |
#### GetFreeroundsLeft
Calculates how many freerounds are remaining.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L69](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L69) |

View File

@ -1,14 +0,0 @@
---
sidebar_position: 3
---
# Freerounds View
## Overview
The `FreeroundsView` component manages the user interface for free rounds in the slot machine game. It is responsible for displaying relevant visuals, handling UI transitions, and triggering animations when the game enters or exits Free Round mode.
## Description
* Constructs a new FreeroundsView instance.
* Invokes the base View constructor for initialization.
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/freerounds-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 23,
"label": "Info",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Info",
"description": "This section provides information about the Info Game.",
"keywords": [
"controller",
"project",
"repository",
"model",
"info-game"
]
}
}

View File

@ -1,33 +0,0 @@
---
sidebar_position: 1
---
# Info Controller
## Index
## Properties
## Methods
* [onPaytableInitialized](#onpaytableinitialized) Handles the `PaytableInitialized` event by setting the total number of paytable pages.
## Details
## Properties
## Methods
### onPaytableInitialized
Handles the `PaytableInitialized` event by setting the total number of paytable pages.
| meta | description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/info-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/info-controller.js#L14) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalPages` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>

View File

@ -1,62 +0,0 @@
---
sidebar_position: 2
---
# Info Model
## Index
### Properties
- [totalPages](#totalpages) `Number` Tracks total number of info pages.
### Methods
- [GetTotalPages](#gettotalpages) Returns total number of paytable pages.
- [SetTotalPages](#settotalpages) Sets the total number of paytable pages.
---
## Details
### Properties
#### totalPages
> Tracks the total number of paytable pages.
| meta | description |
|------|-------------|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/info-model.js#L6](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L6) |
---
## Methods
### GetTotalPages
Returns the total number of pages currently stored.
| meta | description |
|------|-------------|
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/info-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L12) |
---
### SetTotalPages
Sets the total number of paytable pages.
**Returns:** `void`
| meta | description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/model/info-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L17) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalPages` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Info View
## Overview
`InfoView` is a user interface component responsible for displaying end-of-round visuals in the slot machine game. It manages UI transitions and animations, particularly when the game enters Free Round mode, ensuring a smooth and engaging player experience during these state changes.
## Description
* Constructs a new InfoView instance.
* Invokes the base View constructor for initialization.
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/info-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 1,
"label": "Initialize",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Initialize",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"initialize"
]
}
}

View File

@ -1,63 +0,0 @@
---
sidebar_position: 1
---
# Initialize Controller
## Index
### Properties
* [resumeData ](#resumedata) `Object` Current played bet.
### Methods
* [_registerEvent](#_registerevent) Register events to get data from server.
* [_start](#_start) Send request data to server.
* [onConnected](#onconnected) Set resume data when connected server.
* [onStartGame](#onstartgame) Start game when connected succesfully.
* [startResumeGame](#startresumegame) Start game when connected succesfully with resume data.
## Details
#### resumeData
> Current played bet.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L12)|
#### _registerEvent
> Register events to get data from server.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L17)|
#### _start
> Send request data to server.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L24)|
#### onConnected
> Set resume data when connected server.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L32)|
#### onStartGame
> Start game when connected succesfully.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L38)|
#### startResumeGame
> Start game when connected succesfully with resume data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L50)|

View File

@ -1,18 +0,0 @@
{
"position": 27,
"label": "Pickup",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Pickup",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"pickup"
]
}
}

View File

@ -1,91 +0,0 @@
---
sidebar_position: 1
---
# Pickup Controller
---
## Index
### Methods
- [_registerEvent](#_registerevent) — Registers events related to pickups.
- [onViewPickupItem](#onviewpickupitem) — Handles item selection initiated from the view.
- [onViewPresentPickupResultCompleted](#onviewpresentpickupresultcompleted) — Handles result display completion from the view.
- [onPickupItemReceived](#onpickupitemreceived) — Handles the event when an item result is received.
- [onPickupReady](#onpickupready) — Called when the pickup feature becomes available.
- [pickup](#pickup) — Sends a request to pick up an item.
- [pickupEnd](#pickupend) — Handles the end of the pickup feature and notifies listeners.
---
## Details
### Methods
#### _registerEvent
Registers events related to pickups.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L17) |
---
#### onViewPickupItem
Handles item selection initiated from the view.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L23) |
---
#### onViewPresentPickupResultCompleted
Handles result display completion from the view.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L30) |
---
#### onPickupItemReceived
Handles the event when an item result is received..
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L37) |
---
#### onPickupReady
Called when the pickup feature becomes available.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L45) |
---
#### pickup
Sends a request to pick up an item
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L55) |
---
#### pickupEnd
Handles the end of the pickup feature and notifies listeners.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L63](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L63) |

View File

@ -1,58 +0,0 @@
---
sidebar_position: 2
---
# Pickup Model
## Index
### Properties
- [pickupResult](#pickupresult) — Stores the result of the pickup.
### Methods
- [SetPickupResult](#setpickupresult) — Updates the current pickup result.
- [GetPickupResult](#getpickupresult) — Returns the current pickup result stored in the model.
---
## Details
### Properties
#### pickupResult
> Stores the result of the pickup.
| Meta | Description |
|------|-------------|
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L8) |
---
### Methods
#### SetPickupResult
Updates the current pickup result.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L13) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `result` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
---
#### GetPickupResult
Returns the current pickup result stored in the model
| Meta | Description |
|------|-------------|
| Returns | Object |
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L18) |

View File

@ -1,59 +0,0 @@
---
sidebar_position: 3
---
# Pickup View
## Index
### Methods
- [PickupItem](#pickupitem) — Triggers item pickup event.
- [PresentPickupResultCompleted](#presentpickupresultcompleted) — Notifies when pickup result display is complete.
- [PresentPickupResult](#presentpickupresult) — Emits the result of a pickup event.
---
## Details
### Methods
#### PickupItem
Triggers item pickup event.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L14) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `itemID` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
---
#### PresentPickupResultCompleted
Notifies when pickup result display is complete
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L19](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L19) |
---
#### PresentPickupResult
Emits the result of a pickup event.
| Meta | Description |
|------|-------------|
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L24) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
- `result` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>

View File

@ -1,18 +0,0 @@
{
"position": 8,
"label": "Present Feature Trigger",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Present Feature Trigger",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"trigger"
]
}
}

View File

@ -1,44 +0,0 @@
---
sidebar_position: 2
---
# Present Feature Trigger Controller
## Index
### Methods
* [_start](#_start) Initialize some logic which need to be called the game enters the Bet State.
* [_registerEvent](#_registerevent) Register events.
* [onPresentFeatureTriggerCompleted](#onpresentfeaturetriggercompleted) Start feature game.
* [startFeatureGame](#startfeaturegame) Check the feature game condition and start base on it.
## Details
#### _start
> Initialize some logic which need to be called the game enters the Bet State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L16)|
#### _registerevent
> Register events.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L23)|
#### onPresentFeatureTriggerCompleted
> Start feature game.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L29)|
#### startFeatureGame
> Check the feature game condition and start base on it.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L37)|

View File

@ -1,46 +0,0 @@
---
sidebar_position: 2
---
# Present Feature Trigger Model
## Index
### Properties
* [featureData](#featuredata) `WinlineData` The current feature trigger data.
### Methods
* [Reset](#reset) Reset the feature trigger data.
* [SetFeatureTriggerData](#setfeaturetriggerdata) Set the feature trigger data.
* [GetFeatureTriggerData](#getfeaturetriggerdata) Get the feature trigger data.
## Details
#### featureData
> Current point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L10)|
#### Reset
> Reset the feature trigger data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L15)|
#### SetFeatureTriggerData
> Set the feature trigger data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L21)|
#### GetFeatureTriggerData
> Get the feature trigger data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:27](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L27)|

View File

@ -1,5 +0,0 @@
---
sidebar_position: 3
---
# Present Feature Trigger View

View File

@ -1,18 +0,0 @@
{
"position": 9,
"label": "Present Feature Win",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Present Feature Win",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"present-feature-win"
]
}
}

View File

@ -1,60 +0,0 @@
---
sidebar_position: 1
---
# Present Feature Win Controller
## Index
### Methods
- [_start](#_start) Initializes feature win state and notifies the game controller.
- [_complete](#_complete) Resets the model state after feature is done.
- [getFeatureWinData](#getfeaturewindata) Retrieves a structured object describing current feature win state.
- [onViewPresentFeatureWinCompleted](#onviewpresentfeaturewincompleted) Handles the event when the view finishes win presentation. Triggers bonus, freespin, or round end logic accordingly.
---
## Details
### Methods
#### _start
Initializes feature win state and notifies the game controller.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L17) |
---
#### _complete
Resets the model state after feature is done.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L28](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L28) |
---
#### getFeatureWinData
Retrieves a structured object describing current feature win state
| meta | description |
| :--- | :---------- |
| Returns | Object |
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L34) |
---
#### onViewPresentFeatureWinCompleted
Handles the event when the view finishes win presentation. Triggers bonus, freespin, or round end logic accordingly.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L47) |
---

View File

@ -1,181 +0,0 @@
---
sidebar_position: 2
---
# Present Feature Win Model
## Index
### Properties
- [featureHitRule](#featurehitrule) `String` Rule that determines how the feature is triggered.
- [featurePlayedCount](#featureplayedcount) `Number` Number of times the feature has been played.
- [gameWinPoint](#gamewinpoint) `Number` Points won in the base game.
- [featureWinPoint](#featurewinpoint) `Number` Points won in the feature game.
### Methods
- [Reset](#reset) Resets all model properties to default values.
- [SetFeaturePlayedCount](#setfeatureplayedcount) Sets the number of times the feature has been played.
- [GetFeaturePlayedCount](#getfeatureplayedcount) Gets the number of times the feature has been played.
- [SetFeatureHitRule](#setfeaturehitrule) Sets the rule used to trigger the feature.
- [GetFeatureHitRule](#getfeaturehitrule) Gets the feature hit rule.
- [SetGameWinPoint](#setgamewinpoint) Sets the number of points won in the base game.
- [GetGameWinPoint](#getgamewinpoint) Gets the number of points won in the base game.
- [SetFeatureWinPoint](#setfeaturewinpoint) Sets the number of points won in the feature game.
- [GetFeatureWinPoint](#getfeaturewinpoint) Gets the number of points won in the feature game.
- [GetTotalWinPoint](#gettotalwinpoint) Gets the total number of points won (game + feature).
---
## Details
### Properties
#### featureHitRule
> Rule that determines how the feature is triggered.
| meta | description |
| :--- | :---------- |
| Type | String |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L7](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L7) |
---
#### featurePlayedCount
> Number of times the feature has been played.
| meta | description |
| :--- | :---------- |
| Type | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L8) |
---
#### gameWinPoint
> Points won in the base game.
| meta | description |
| :--- | :---------- |
| Type | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L9) |
---
#### featureWinPoint
> Points won in the feature game.
| meta | description |
| :--- | :---------- |
| Type | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L10) |
---
### Methods
#### Reset
Resets all model properties to default values.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L16) |
---
#### SetFeaturePlayedCount
Sets the number of times the feature has been played.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L25](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L25) |
---
#### GetFeaturePlayedCount
Gets the number of times the feature has been played.
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L31](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L31) |
---
#### SetFeatureHitRule
Sets the rule used to trigger the feature.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L35) |
---
#### GetFeatureHitRule
Gets the feature hit rule.
| meta | description |
| :--- | :---------- |
| Returns | String |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#41) |
---
#### SetGameWinPoint
Sets the number of points won in the base game.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L45) |
---
#### GetGameWinPoint
Gets the number of points won in the base game.
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L51](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L51) |
---
#### SetFeatureWinPoint
Sets the number of points won in the feature game.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L55) |
---
#### GetFeatureWinPoint
Gets the number of points won in the feature game.
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L61) |
---
#### GetTotalWinPoint
Gets the total number of points won (game + feature).
| meta | description |
| :--- | :---------- |
| Returns | Number |
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L65) |

View File

@ -1,24 +0,0 @@
---
sidebar_position: 3
---
# Present Feature Win View
## Index
### Methods
- [PresentComplete](#presentcomplete) Triggers the `PresentFeatureWinCompleted` event.
---
## Details
### Methods
#### PresentComplete
Triggers the `PresentFeatureWinCompleted` event which signals that the feature win presentation has completed.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-feature-win-view.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/present-feature-win-view.js#L13) |

View File

@ -1,18 +0,0 @@
{
"position": 7,
"label": "Present Win",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Present Win",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"presentwin"
]
}
}

View File

@ -1,131 +0,0 @@
---
sidebar_position: 1
---
# Present Win Controller
## Index
### Methods
* [_registerEvent](#_registerevent) Register events.
* [_start](#_start) Initialize some logic which need to be called the game enters the Present Win State.
* [reset](#reset) Reset the current win presentation data.
* [getAllWinsData](#onreplayhistoryclient) Get the all wins data.
* [presentWin](#onresume) Start the current win presentation.
* [transitionToNextState](#isresumeend) Check the condition and move to the next state.
* [presentPoint](#ondeposit) Start the current win point presentation.
* [getSequencePresentWin](#onconnected) Process the current win data and return a sequence of present wins.
* [startSequencePresentWin](#onstartgame) Start the sequence of present wins.
* [calculateDurationPresentAllWins](#oncollectdatareceived) Calculate the duration of present wins.
* [onPresentSpecialWinTriggered](#onbalancedatareceived) Start the special win.
* [onPresentSpecialWinCompleted](#onbalancechangerateclicked) Stop the special win.
* [onPresentWinPointCompleted](#updatebalance) Stop the current win point presentation.
* [onPresentWinTurboCompleted](#notifyblance) Notify the client balance.
* [allowLoopPresentation](#placebet) Indicates whether the sequence of present wins.
## Details
#### _registerevent
> Register events.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L32)|
#### _start
> Initialize some logic which need to be called the game enters the Bet State.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L41)|
#### reset
> Reset the current win presentation data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:53](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L53)|
#### getAllWinsData
> Get the all wins data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:64](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L64)|
#### presentWin
> Start the current win presentation.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:82](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L82)|
#### transitionToNextState
> Check the condition and move to the next state.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:91](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L91)|
#### presentPoint
> Start the current win point presentation.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:125](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L125)|
#### getSequencePresentWin
> Process the current win data and return a sequence of present wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:137](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L137)|
#### startSequencePresentWin
> Start the sequence of present wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:168](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L168)|
#### calculateDurationPresentAllWins
> Calculate the duration of present wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:216](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L216)|
#### onPresentSpecialWinTriggered
> Start the special win.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:228](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L228)|
#### onPresentSpecialWinTriggered
> Stop the special win.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:237](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L237)|
#### onPresentWinPointCompleted
> Stop the current win point presentation.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:245](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L245)|
#### onPresentWinTurboCompleted
> Stop the current win presentation if turbo mode is active.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:254](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L254)|
#### onPresentWinPointCompleted
> Indicates whether the sequence of present wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:264](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L264)|

View File

@ -1,141 +0,0 @@
---
sidebar_position: 2
---
# Present Win Model
## Index
### Properties
* [winLinesData](#winlinesdata) `WinlineData` The current win lines data.
* [winScattersData](#winscattersdata) `WinlineData` The current scatter win data.
* [winPoint](#winpoint) `Number` The current win point.
* [durationPresentAllWins](#durationpresentallwins) `Number` The duration of all wins.
* [durationPresentWinLines](#durationpresentwinlines) `Number` The duration of win lines.
* [durationPresentWinScatters](#durationpresentwinscatters) `Number` The duration of scatter win.
### Methods
* [Reset](#reset) Reset the present win data.
* [SetWinLinesData](#setwinlinesdata) Set the current win lines data.
* [GetWinLinesData](#getwinlinesdata) Get the current win lines data.
* [SetWinScattersData](#setwinscattersdata) Set the current scatter win data.
* [GetWinScattersData](#getwinscattersdata) Get the current scatter win data.
* [SetWinPoint](#setwinpoint) Set the current win point.
* [GetWinPoint](#getwinpoint) Get the current win point.
* [SetDurationPresentAllWins](#setdurationpresentallwins) Set the duration of all wins.
* [GetDurationPresentAllWins](#getdurationpresentallwins) Get the duration of all wins.
## Details
#### winLinesData
> The current win lines data.<br/>
| meta | description |
| :--- | :---------- |
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L11)|
#### winScattersData
> The current scatter win data.<br/>
| meta | description |
| :--- | :---------- |
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L12)|
#### winPoint
> The current win point.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L13)|
#### durationPresentAllWins
> The duration of all wins.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L14)|
#### durationPresentWinLines
> The duration of win lines.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L15)|
#### durationPresentWinScatters
> The duration of scatter win.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L16)|
#### Reset
> Reset the present win data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L21)|
#### SetWinLinesData
> Set the current win lines data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L32)|
#### GetWinLinesData
> Get the current win lines data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#38)|
#### SetWinScattersData
> Set the current scatter win data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L42)|
#### GetWinScattersData
> Get the current scatter win data.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:48](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#48)|
#### SetWinPoint
> Set the current win point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:52](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L52)|
#### GetWinPoint
> Get the current win point.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#58)|
#### SetDurationPresentAllWins
> Set the duration of all wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:52](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L52)|
#### GetDurationPresentAllWins
> Get the duration of all wins.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#58)|

View File

@ -1,87 +0,0 @@
---
sidebar_position: 3
---
# Present Win View
## Index
### Properties
* [listTimer](#listtimer) `Timer` List of timer actions that have a finite duration.
### Methods
* [StartPresentWin](#startpresentwin) Called when the win presentation starts.
* [StopPresentWin](#stoptpresentwin) Called when the win presentation has completed.
* [GetDurationFromHitItems](#getdurationfromhititems) Get duration of the win item's animation.
* [PresentWinTurbo](#presentwinturbo) Called when the win presentation is running in turbo mode.
* [PresentAllWins](#presentallwins) Called when the win presentation displays all win items.
* [PresentWinLines](#presentwinlines) Called when the win presentation displays win lines.
* [PresentWinScatters](#presentwinscatters) Called when the win presentation displays the scatter win.
* [clearTimer](#cleartimer) Clear the list of timer actions.
## Details
#### listTimer
> List of timer actions that have a finite duration.<br/>
| meta | description |
| :--- | :---------- |
| Type | [Timer](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/helper/timer.js#L4) |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L12)|
#### StartPresentWin
> Called when the win presentation starts.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L17)|
#### StopPresentWin
> Called when the win presentation has completed.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L23)|
#### GetDurationFromHitItems
> Get duration of the win item's animation.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L29)|
#### PresentWinTurbo
> Called when the win presentation is running in turbo mode.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:33](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L33)|
#### PresentAllWins
> Called when the win presentation is running in turbo mode.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L47)|
#### PresentWinLines
> Called when the win presentation displays win lines.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L61)|
#### PresentWinScatters
> Called when the win presentation displays the scatter win.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:89](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L89)|
#### clearTimer
> Clear the list of timer actions.<br/>
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:117](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L117)|

View File

@ -1,18 +0,0 @@
{
"position": 25,
"label": "Respin Game",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Respin Game",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"respin game"
]
}
}

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Respin View
## Overview
* The `RespinView` class is responsible for the presentation layer of the respin feature. It extends the core `View` component and can be customized to display visual feedback related to respins.
## Description:
* Initializes a new instance of RespinView.
* Calls the base View constructor.
* [p4f-slotty-core/src/view/respin-view.js#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/respin-view.js#L5) |

View File

@ -1,177 +0,0 @@
---
sidebar_position: 1
---
# Respin Controller
## Index
### Properties
* [timeoutStartRespin](#timeoutstartrespin) `Object | null` Timeout handler for initiating respin.
* [isPaused](#ispaused) `Boolean` Indicates whether the controller is paused.
* [waiter](#waiter) `Object | null` Handles timing-related waiting.
### Methods
* [_start](#_start) Initializes respin-related values from input data.
* [_complete](#_complete) Cleans up waiting logic and resets the model.
* [_registerEvent](#_registerevent) Registers all necessary events for the respin controller.
* [onRespinReady](#onrespinready) Handles respin-ready state. Triggers respin after a delay.
* [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles logic when the feature game start is clicked.
* [onPresentFeatureTriggerCompleted](#onpresentfeaturetriggercompleted) Handles logic after a present feature trigger finishes.
* [onSpinEnd](#onspinend) Processes logic at the end of a spin, including retrigger check.
* [respinEnd](#respinend) Triggers final respin result notification.
* [onRespinDataReceived](#onrespindatareceived) Updates model state when server sends respin data.
* [onPickupItemReceived](#onpickupitemreceived) Processes pickup-related bonus or extra respin data.
* [respin](#respin) Core logic to trigger or end respin based on model/game state.
## Details
### Properties
#### timeoutStartRespin
> Timeout handler for initiating respin.
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L15) |
#### isPaused
> Indicates whether the controller is paused.
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L16) |
#### waiter
> Handles timing-related waiting.
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L17) |
### Methods
#### _start
Initializes respin-related values from input data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L22) |
#### _complete
Cleans up waiting logic and resets the model.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L29) |
#### _registerEvent
Registers all necessary events for the respin controller.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L39](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L39) |
#### onRespinReady
Handles respin-ready state. Triggers respin after a delay.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L50) |
#### onStartFeatureGameClicked
Handles logic when the feature game start is clicked.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L59) |
#### onPresentFeatureTriggerCompleted
Handles logic after a present feature trigger finishes.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L67](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L67) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `isRetrigger` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
</p>
#### onSpinEnd
Processes logic at the end of a spin, including retrigger check.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L77) |
#### respinEnd
Triggers final respin result notification.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L92) |
#### onRespinDataReceived
Updates model state when server sends respin data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L104](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L104) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `point` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `retriggerData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### onPickupItemReceived
Processes pickup-related bonus or extra respin data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L115](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L115) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `respinBonus` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### respin
Core logic to trigger or end respin based on model/game state.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L129](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L129) |

View File

@ -1,179 +0,0 @@
---
sidebar_position: 2
---
# Respin Model
## Index
### Properties
* [respinRetriggerData](#respinretriggerdata) `Object | null` Data for respin retrigger conditions.
* [respinLeft](#respinleft) `Number` Number of respins remaining.
* [totalRespin](#totalrespin) `Number` Total number of respins triggered by feature logic.
* [respinWin](#respinwin) `Number` Total win amount during respins.
### Methods
* [Reset](#reset) Resets all respin data to default values.
* [SetRespinLeft](#setrespinleft) Sets the number of remaining respins.
* [SetTotalRespin](#settotalrespin) Sets the total number of respins.
* [SetRespinRetriggerData](#setrespinretriggerdata) Sets retrigger data for respins.
* [SetRespinWin](#setrespinwin) Sets the win amount during respins.
* [GetRespinLeft](#getrespinleft) Returns the number of remaining respins.
* [GetRespinPlayed](#getrespinplayed) Calculates the number of played respins.
* [GetTotalRespin](#gettotalrespin) Returns the total number of respins.
* [GetRespinRetriggerData](#getrespinretriggerdata) Returns a clone of the retrigger data object.
* [GetRespinWin](#getrespinwin) Returns the total win during respins.
## Details
### Properties
#### respinRetriggerData
> Data for respin retrigger conditions.
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L9) |
#### respinLeft
> Number of respins remaining.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L10) |
#### totalRespin
> Total number of respins triggered by feature logic.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L11) |
#### respinWin
> Total win amount during respins.
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L12) |
### Methods
#### Reset
Resets all respin data to default values.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L17) |
#### SetRespinLeft
Sets the number of remaining respins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L26) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### SetTotalRespin
Sets the total number of respins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L32) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### SetRespinRetriggerData
Sets retrigger data for respins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L38) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `respinRetriggerData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### SetRespinWin
Sets the win amount during respins.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L44) |
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `respinWin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetRespinLeft
Returns the number of remaining respins.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L50) |
#### GetRespinPlayed
Calculates the number of played respins.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L56) |
#### GetTotalRespin
Returns the total number of respins.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L62) |
#### GetRespinRetriggerData
Returns a clone of the retrigger data object.
| meta | description |
| :--- | :---------- |
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L58) |
#### GetRespinWin
Returns the total win during respins.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L74) |

View File

@ -1,18 +0,0 @@
{
"position": 4,
"label": "Spin",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Spin",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"spin"
]
}
}

View File

@ -1,131 +0,0 @@
---
sidebar_position: 1
---
# Spin Controller
## Index
### Properties
* [savedBetPoint](#savedbetpoint) `Number` Current played bet.
* [savedTotalBetPoint](#savedtotalbetpoint) `Number` Current total played bet.
* [isPaused](#ispaused) `Boolean` Indicates if the game is currently paused, including when paused by lobby force.
* [waiter](#waiter) `object ` Waits until not paused.
### Methods
* [_start](#_start) Starts a spin round. Prepares spin data, handles game round confirmation, and waits until the game is not paused before sending a spin request.
* [_complete](#_complete) Completes the spin round and stops any waiting processes.
* [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
* [onNextScrollDataReceived](#onnextscrolldatareceived) Updates the model with new scroll data received from the network.
* [onStopSpinClicked](#onstopspinclicked) Notifies listeners when the stop spin button is clicked.
## Details
### Properties
#### savedbetpoint
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Current played bet.</p>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L14)|
#### savedTotalBetPoint
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Current total played bet.</p>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L15)|
#### isPaused
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Indicates if the game is currently paused, including when paused by lobby force.</p>
| meta | description |
| :--- | :---------- |
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L16)|
#### waiter
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Waits until not paused.</p>
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L17)|
### Methods
#### _start
Starts a spin round. Prepares spin data, handles game round confirmation, and waits until the game is not paused before sending a spin request.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L32)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
* `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
* `freeroundsID` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
</p>
#### _complete
Completes the spin round and stops any waiting processes.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L68)|
#### onBetDataChanged
> Updates internal bet tracking based on input data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L77)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
</p>
#### onNextScrollDataReceived
Updates the model with the new scroll data received from the network.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L83](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L83)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>
#### onStopSpinClicked
Notifies listeners when the stop spin button is clicked.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L89](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L89)|

View File

@ -1,114 +0,0 @@
---
sidebar_position: 2
---
# Spin model
## Index
### Properties
* [nextScrollData](#nextscrolldata) `Object` Stores the next scroll data
* [betPoint](#betpoint) `Number` Stores the current bet point.
* [totalBetPoint](#totalbetpoint) `Number` Stores the total bet point.
### Methods
* [SetBetPoint](#setbetpoint) Sets the bet point value.
* [GetBetPoint](#getbetpoint) Gets the current bet point value.
* [SetTotalBetPoint](#settotalbetpoint) Sets the total bet point value.
* [GetTotalBetPoint](#gettotalbetpoint) Gets the current total bet point value.
* [SetNextScrollData](#setnextscrolldata) Sets the next scroll data.
## Details
### Properties
#### nextScrollData
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the current bet point.</p>
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L9)|
#### betPoint
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the next scroll data.</p>
| meta | description |
| :--- | :---------- |
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L10)|
#### totalBetPoint
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the next scroll data.</p>
| meta | description |
| :--- | :---------- |
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)|
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L10)|
### Meethods
#### SetBetPoint
Sets the bet point value.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L16)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetBetPoint
Gets the current bet point value.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L22)|
#### SetTotalBetPoint
Stores the total bet point.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L28](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L28)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
</p>
#### GetTotalBetPoint
Gets the current total bet point value.
| meta | description |
| :--- | :---------- |
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L34)|
#### SetNextScrollData
Sets the next scroll data.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L40)|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
**Parameters**
* `nextScrollData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
</p>

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Spin view
## Overview
* SpinView is a view class for the spin feature in the slot game. It extends the base View class and is intended to handle the visual representation and UI logic for spins.
## Description:
* Initializes a new instance of SpinView.
* Calls the base View constructor.
* [p4f-game-core/src/view/spin-view.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/spin-view.js#L5)

View File

@ -1,18 +0,0 @@
{
"position": 30,
"label": "Take and Gamble",
"collapsible": true,
"collapsed": true,
"link": {
"type": "generated-index",
"title": "Take and Gamble",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"controller",
"project",
"repository",
"model",
"take-and-gamble"
]
}
}

View File

@ -1,102 +0,0 @@
---
sidebar_position: 1
---
# Take Or Gamble Controller
## Index
### Methods
* [_start](#_start) Initializes the take-or-gamble phase depending on game state.
* [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions.
* [onTakeClicked](#ontakeclicked) Handles take button click.
* [onGambleClicked](#ongambleclicked) Handles gamble button click.
* [take](#take) Triggers the 'take' action.
* [gamble](#gamble) Triggers the 'gamble' action.
* [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled.
* [_complete](#_complete) Placeholder for completion handling.
---
## Details
### Methods
#### _start
Initializes the take-or-gamble phase depending on game state.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L16) |
---
#### _registerEvent
Registers trigger listeners for take or gamble actions and win-limit check.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L34) |
---
#### onTakeClicked
Handles take button click.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L47) |
---
#### onGambleClicked
Handles gamble button click.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L57) |
---
#### take
Triggers the 'take' action and notifies with current total win points.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L59) |
---
#### gamble
Triggers the 'gamble' action and notifies with current total win points.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L67](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L67) |
---
#### checkShowWinLimit
Checks whether win limit has been reached and if skipping gamble is disabled.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L75](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L75) |
---
#### _complete
Placeholder for completion handling.
| meta | description |
| :--- | :---------- |
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L80) |

View File

@ -1,16 +0,0 @@
---
sidebar_position: 2
---
# Take Or Gamble Model
## Overview
`Take Or Gamble Model` is a model class for the "Take or Gamble" feature in the slot game. It extends the base model class and manages the logic and state for handling win events, including the decision to take winnings or gamble for more.
## Description
* Initializes a new instance of `Take Or Gamble Model`.
* Calls the base model constructor.
* Handles UI logic and state for the "Take or Gamble" feature.
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5)

View File

@ -1,15 +0,0 @@
---
sidebar_position: 3
---
# Take Or Gamble View
## Overview
`Take Or Gamble View` is a UI component for the slot machine's spin feature. It extends the base `View` class and manages the display and user interactions related to taking winnings or gambling them.
## Description
* Constructs a new `Take Or Gamble View` instance.
* Invokes the base `View` constructor.
* Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5)

View File

@ -1,69 +0,0 @@
---
sidebar_position: 1
---
# Create The Project
The first step to start a new project.
When starting a new project, you'll be giving an empty repository.
Take the `Roma Legacy` game as an example.
## Clone Git repository
To clone this repository, run the following command:
```bash
git clone https://gitea.plp19.com/cocos-eanew/coc-roma-legacy.git
```
Once cloned, configure your Git user information (only needed the first time):
```bash
cd coc-roma-legacy
git config user.name "Your Git Username"
git config user.email "Your Email"
```
## Create Cocos Creator project
Inside `coc-roma-legacy` folder, create a `project.json` file:
```json title="project.json"
{
"engine": "cocos-creator-js",
"packages": "packages",
"name": "coc-roma-legacy",
"version": "2.4.4",
"isNew": false
}
```
Now you can open the project in `Cocos Creator`.
1. Launch **Cocos Dashboard**
2. Click **Add Project**
3. Navigate to **coc-roma-legacy** folder
4. Click **Select Project**.
![Cocos Dashboard](./img/cocos-dashboard.png)
Now that the project is available in `Cocos Dashboard`, double-click on it to open.
`Cocos Creator` will generate the entire game structure including `.gitignore` file.
![Cocos folder structure](./img/cocos-folder-structure.png)
## Commit to Git
At this point, you should create an initial commit and open your first `Pull Request`.
Run these following command:
```bash
git checkout -b feature/init-project
git add --a
git commit -m "Init cocos project"
git push --set-upstream origin feature/init-project
```

View File

@ -1,92 +0,0 @@
---
sidebar_position: 2
---
# Add Submodules
Let's add more packages and templates to the project.
A slot game project is composed of multiple Git repositories used as [submodules](https://www.atlassian.com/git/tutorials/git-submodule).
It is important to understand the responsibilities of each submodule.
We recommend reviewing the [Slot Core Submodule documentation](../category/submodules/) before proceeding.
## Main submodules
These are submodules presented in every Slot Game project.
To add main submodules, run the following commands:
```bash
git submodule add -f ../base-slot-template.git assets/core-assets/slotty-core
git submodule add -f ../game-core-template.git assets/core-assets/game-core
git submodule add -f ../hyper-slot-template.git assets/core-assets/hyper-core
```
To add packages submodule, first **delete packages folder**.
Then run the follwing command:
```bash
git submodule add -f ../hyper-editor-package.git packages
```
## International Theme vs Chinese Theme
Depend on the theme of your game, add these commands:
For `International Theme`:
```bash
git submodule add -f ../hyper-wintune-international.git assets/core-assets/hyper-wintune-international
git submodule add -f ../hyper-coin-shower-international.git assets/core-assets/hyper-coin-shower-international
git submodule add -f ../hyper-dialog-international.git assets/core-assets/hyper-dialog-international
```
For `Chinese Theme`:
```bash
git submodule add -f ../hyper-wintune-chinese.git assets/core-assets/hyper-wintune-chinese
git submodule add -f ../hyper-coin-shower-chinese.git assets/core-assets/hyper-coin-shower-chinese
git submodule add -f ../hyper-dialog-chinese.git assets/core-assets/hyper-dialog-chinese
```
## Optional Submodule
These are submodules for specific feature including: `landing sound`, effect `win border/tension` and `hyper jackpot`.
Add one or more of those submodules depends on the game design.
```bash
git submodule add -f ../hyper-jackpot-package.git assets/core-assets/hyper-jackpot
git submodule add -f ../hyper-win-border-and-tension.git assets/core-assets/hyper-win-border-and-tension
git submodule add -f ../hyper-scatter-landing-sound.git assets/core-assets/hyper-scatter-landing-sound
```
## Update submodules to latest commit
All submodules should be on master branch and update to the latest commit.
To fetch the latest update, run the following command:
```bash
git submodule update --init --recursive
```
:::tip
You can drop the `--init` after the first time.
:::
## Commit to git
Now that we add all nesscessary submodule to the project, let's commit all of these change to open a Pull Request:
Run these following command:
```bash
git checkout -b feature/add-submodules
git add --a
git commit -m "Add submodules"
git push --set-upstream origin feature/add-submodules
```

View File

@ -1,35 +0,0 @@
---
sidebar_position: 3
---
# Setup Custom Cocos Engine
Set **Javascript Engine Path** to a **custom Cocos Engine**.
Thanks to the open source nature of Cocos Creator, we are able to customize some of the function in the source code to meet the requirement for Hyper Slot Game.
For the detail of the Custom Engine, take a look at this [**Custom Cocos Engine documentation**](../category/custom-cocos-engine)
**Clone the repository**
This custom engine can be universally used for all Hyper Slot Game project. So you only have to do this step once.
Choose your working directory and clone this repo using the following command:
```bash
git clone https://gitea.plp19.com/cocos-core/cocos-creator-engine.git
```
**Set custom engine in Cocos Creator**
Open the project in Cocos Creator.
From the main menu, choose `Projects` -> `Project Settings`
![Project Setting](./img/project-setting.png)
Click on the `Custom Engine` tab, set `Javascript Engine Path` to the `cocos-creator-engine` folder.
Click `Save` and restart Cocos Creator.
![Set Custom Engine](./img/set-custom-engine.png)

View File

@ -1,52 +0,0 @@
---
sidebar_position: 4
---
# Create Game Folder Structure
Make a folder structure for all the game assets.
Inside the `assets` folder, we already have a `core-assets` folder which contains all assets of the template submodule.
We need to have a `game-assets` folder to contain the assets for our game.
Create the following folder structure:
![Game Assets Folder](./img/game-assets.png)
Next we're gonna use our first template assets - the template cocos scenes.
These scenes are already setup and ready to use.
Copy all Cocos scene assets from `assets/core-assets/hyper-core/scenes` to ` assets/game-assets/scenes`.
Rename those scenes:
- `template-loading` -> `loading`
- `template-main-game` -> `main-game`
- `template-preload` -> `preload`
- `template-preview` -> `preview`
![Template Scene](./img/template-scenes.png)
Inside `assets/game-assets/scripts/`, create a folder called `custom-scaler` then add a script `custom-scale-data.js`.
![Custom Scale](./img/custom-scale.png)
The setup is complete. You should create a commit and open Pull Request.
Run these following command:
```bash
git checkout -b feature/setup-folder-structure
git add --a
git commit -m "Setup Folder Structure"
git push --set-upstream origin feature/setup-folder-structure
```
:::warning
Notice that you can only commit `game-asset`, `scripts` and `scenes`.
Git automatically ignores empty folders, so don't be alarmed if they don't appear in your commits.
No worries—these folders will soon be filled with plenty of assets!
:::

View File

@ -1,17 +0,0 @@
{
"position": 1,
"label": "Setup The Project",
"collapsible": true,
"collapsed": false,
"link": {
"type": "generated-index",
"title": "Start a new project",
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
"keywords": [
"setup",
"project",
"repository",
"development environment"
]
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

View File

@ -1,178 +0,0 @@
---
sidebar_position: 1
---
# Game Configuration
The initial configuration requirements from the Slot Core.
---
While the core logic is responsible for calculations and maintaining the game state, it's the client's responsibility to define all game-specific information.
Lets go step-by-step to define these elements.
## Slot Items
Each game features specific slot items displayed on the reel panel. By default, the Slot Core includes only two items: **Wild** and **Scatter**.
For `Roma Legacy`, there are 8 slot items total, including **Wild**.
![Symbols](./img/01-game-config/symbols.png)
To define the 7 additional items for this game, create the following script:
```jsx title="assets/game-assets/scripts/slotty-settings/slotty-item.js"
var SlottyItem = p4fslot.require('slotty-item');
var Enum = p4fslot.require('extendable-enum');
Enum.InitEnum(SlottyItem, [
'Pic1',
'Pic2',
'Pic3',
'Pic4',
'Pic5',
'Pic6',
'Pic7',
'Bonus'
]);
module.exports = SlottyItem;
```
**Note**: Item names are defined using the texture asset names, not the symbol names received from the server response.
|Asset's name | Server Response |
|-------------|-----------------|
| Pic1 | PIC1 |
| Pic2 | PIC2 |
| Pic3 | PIC3 |
| Pic4 | PIC4 |
| Pic5 | PIC5 |
| Pic6 | PIC6 |
| Pic7 | PIC7 |
| Bonus | BONUS |
For example, if the server returns a symbol named **BONUS**, the game should display the **Bonus** asset.
To establish this mapping, use the following configuration script:
```jsx title="assets/game-assets/scripts/configs/extend-hyper-gaming-config.js"
var HyperGamingConfig = require('hyper-gaming-config');
var SlottyItem = require('slotty-item');
HyperGamingConfig.itemMapper['BONUS'] = SlottyItem.Bonus;
HyperGamingConfig.itemMapper['PIC1'] = SlottyItem.Pic1;
HyperGamingConfig.itemMapper['PIC2'] = SlottyItem.Pic2;
HyperGamingConfig.itemMapper['PIC3'] = SlottyItem.Pic3;
HyperGamingConfig.itemMapper['PIC4'] = SlottyItem.Pic4;
HyperGamingConfig.itemMapper['PIC5'] = SlottyItem.Pic5;
HyperGamingConfig.itemMapper['PIC6'] = SlottyItem.Pic6;
HyperGamingConfig.itemMapper['PIC7'] = SlottyItem.Pic7;
```
## Slot Setting
There are two settings that determine the betting method used in the game:
- **TypeBetConfig**: this defines the bet calculation method. The available options are:
- Way
- Line
- BetOptions
- Dynaways
- **TypePayline**: this setting determines which text label is displayed in the game's UI. Each type corresponds to a different label:
| Type | Text Message |
|---------|----------------|
|Way | BET PER WAY |
|Line | BET PER LINE |
|BaseBet | PLAY MULTIPLIER|
Depending on the requirements of your game, you can customize both Payline and BetConfig by adding the following script:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var BaseSlottySetting = p4fslot.require('slotty-setting');
var SlottyItem = require('slotty-item');
var SlottyParameter = p4fslot.require('slotty-parameter');
BaseSlottySetting.prototype._getDefaultTypePayline = function () {
return SlottyParameter.TypePayline.Line;
};
BaseSlottySetting.prototype._getDefaultTypeBetConfig = function () {
return SlottyParameter.TypeBetConfig.Line;
}
```
## Default Slot Item Pattern
When the game is opened, the reel panel should display a **default pattern** that contains no possible win lines.
For instance, the following item pattern should not be used, as it contains two win lines:
![Win Pattern](./img/01-game-config/win-pattern.png)
To keep the gameplay experience fresh, the displayed pattern should be selected randomly each time. At a minimum, three non-winning patterns should be available.
To configure these patterns, add the following method to your **extend-slotty-setting** script:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
BaseSlottySetting.prototype._getPatternNotWin = function () {
return [
[SlottyItem.Pic5, SlottyItem.Pic3, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Bonus, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
SlottyItem.Pic2, SlottyItem.Pic6, SlottyItem.Pic2, SlottyItem.Pic1, SlottyItem.Pic2
],
[SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic2, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic7,
SlottyItem.Pic7, SlottyItem.Pic3, SlottyItem.Bonus, SlottyItem.Pic2, SlottyItem.Pic3
],
[SlottyItem.Pic1, SlottyItem.Pic2, SlottyItem.Pic3, SlottyItem.Pic7, SlottyItem.Pic3,
SlottyItem.Pic2, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Pic2,
SlottyItem.Pic1, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Bonus
]
];
};
```
The results of those 3 patterns are shown below:
| Pattern 1 | Pattern 2 | Pattern 3 |
|---------------------------------|---------------------------------|---------------------------------|
|![Pattern 1](./img/01-game-config/pattern-1.png)|![Pattern 2](./img/01-game-config/pattern-2.png)|![Pattern 3](./img/01-game-config/pattern-3.png)|
## Hyper Gaming Integration
The Slot Core supports both SmartFox and Hyper Gaming connections. For Hyper Gaming, we integrate specific modules using the DIContainer.
To connect and interact with the Hyper Gaming server, we need to register two key modules:
- **hyper-gaming-config**: manages the connection configuration for the Hyper Gaming server.
- **hyper-gaming-server-handler**: handles request and response data for game-server communication.
To register these, add the `_registerInjection` function in `extend-slotty-setting.js`:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var DIContainer = p4fcore.require('di-container');
BaseSlottySetting.prototype._registerInjection = function () {
DIContainer.Register('serverConfig', require('hyper-gaming-config'));
DIContainer.Register('serverHandler', p4fslot.require('hyper-gaming-server-handler'));
};
```
In addition to server modules, all Hyper Gaming projects should initialize the following handlers for sound, hotkey and UI interaction.
In the same `extend-slotty-setting.js`, add this function:
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var HyperSoundHandler = require('sound-handler');
var UISoundHandler = require('ui-sound-handler');
var HyperHotkeyHandler = require('hyper-hotkey-handler');
var HyperNotificationHandler = require('hyper-notification-handler');
BaseSlottySetting.prototype._initializeParameter = function () {
new UISoundHandler();
new HyperSoundHandler();
new HyperHotkeyHandler();
new HyperNotificationHandler();
};
```

View File

@ -1,29 +0,0 @@
---
sidebar_position: 2
---
# Preview Scene
Local login configuration.
---
The login simulator scene allows you to run the game using a session account during development, enabling easier testing and debugging.
This scene includes a `login-hyper-gaming` object used to establish a connection with a running environment of your choice.
![Preview Scene](./img/02-preview-scene/preview-scene.png)
Available environments:
- **DEMO** : similar to [https://gaming-world.joker88.club]( https://gaming-world.joker88.club/). This environment uses a demo account, so no login is required. Some features are disabled, but the outcome feature is enabled, allowing you to select specific outcomes for testing purposes.
- **SAT** : similar to [http://fns.joker88.club](http://fns.joker88.club/). This environment requires a valid account to log in. Except for the outcome feature, all other features are enabled, including replay and resume functionality.
- **LOCAL** : Use this only if other environments are unavailable. By manually setting up session data, you can run the game locally. Not recommended for regular use.
To use preview scene, simply choose an Enviroment and put in the Game ID, then save the scene.
:::tip
You should set the preview scene as a start scene in `Project Setting`. With that, no matter which scene your are on, when the game starts, it will always load preview scene first.
![Preview Scene Setting](./img/02-preview-scene/preview-scene-setting.png)
:::

View File

@ -1,68 +0,0 @@
---
sidebar_position: 3
---
# Preload Scene
Setup configuration for asset loading.
---
The Preload Scene is where you define which assets will be downloaded **before** and **after** the game starts.
Setting up the preload system involves several steps, depending on the types of assets and specific download requirements.
Check out the [Game Assets Structure](../category/game-asset-structure) for more detail.
## Preload vs Postload
Hyper Slot Game uses a two-stage loading process:
- **Preload**: Downloads essential assets before the game scene is displayed. These typically include the background, text elements, and static textures.
- **Postload**: Downloads additional assets in the background after the scene has been loaded. This usually includes animations. While these assets are downloading, static frame texture are shown in place of the actual animations. Once the download is complete, the animations seamlessly replace the static frame.
| Preload | Postload |
|--------------------------------------|---------------------------------|
| ![Preload](./img/03-preload-scene/preload-static.png) | ![Postload](./img/03-preload-scene/postload.png) |
Preload and postload assets are organized by scene.
For example, before loading the **Main Scene**, its preload assets are downloaded first. After the scene is displayed, the postload assets begin downloading in the background.
The same process applies to other scenes such as **Gamble**, **Free Game**, and **Bonus**.
## Platform Assets
Hyper Slot Game runs on both Web Desktop and Web Mobile platforms. While the UI and textures appear visually similar across both, the actual assets differ due to platform-specific optimization requirements.
Typically, the mobile version uses smaller-sized texture assets to reduce memory usage and improve performance.
| Assets | Desktop Size | Mobile Size |
|-----------------------|---------------|--------------|
| Symbol Bonus Animation| 1024x2048 | 1024x1024 |
| Bigwin Spine Animation| 512x1024 | 358x717 |
As a result, when the game detects a mobile device, it will automatically download a different set of optimized assets tailored for that platform.
## Localize Assets
Hyper Slot Game supports localization through both text and raw asset replacements, with English as the default language.
Based on the selected language configuration, the game will download the corresponding localized assets instead of the default English versions.
| Assets | EN | ZH | TH |
|---------------|-----------------------------------------|---------------------------------------------|---------------------------------------------|
|Text Buy Bonus|![Buy Bonus EN](./img/03-preload-scene/title-buy-bonus.png)|![Buy Bonus ZH](./img/03-preload-scene/title-buy-bonus_zh.png)|![Buy Bonus TH](./img/03-preload-scene/title-buy-bonus_th.png)|
## Setting Up the Preload Scene
![Preload Scene Setup](./img/03-preload-scene/preload-scene.png)
To set up the Preload Scene, simply open the scene and run the **preload-hyper** command from the **P4F Editor** package.
The available commands are:
- **Load Message**: Scans the working directory for any text message files and loads them into the `game-message` component.
- **Load Localize**: Detects all available language options and loads the corresponding localized assets into the `localization` component.
- **Load Preload Assets**: Defines preload and postload assets, then loads them into the `p4f-scene-manager` component of the `scene-manager` node.
- **Load Assets By Platform**: Scans for mobile-specific assets (used when the game runs on mobile devices) and loads them into the `platform-asset-manager` component.
- **Load Sound**: Scans for background music and sound effects (SFX) and loads them into the `sound-controller`.
- **Load All Above**: Executes all of the above commands in sequence.

View File

@ -1,59 +0,0 @@
---
sidebar_position: 4
---
# Loading Scene
Generate asset loading scene layout.
---
This is where the actual preload asset downloading begins, accompanied by a progress bar to indicate loading status.
In addition to loading assets, Hyper Slot Game also uses this scene to showcase the games main features through in-game advertisements.
![Loading Roma Legacy](./img/04-loading-scene/loading-roma-legacy.png)
## Loading Hyper vs New Loading Hyper
In Hyper Slot games, there are 2 styles of loading scene:
- **loading-hyper**: The default loading setup. Displays all advertising features on a single screen, with an option to automatically launch the game once all preload assets are downloaded.
- **new-hyper-loading**: A newer loading style that presents advertising features in a paginated layout. This version does not include an option to start the game automatically.
| loading-hyper | new-loading-hyper |
|-------------------------------------------------------|-----------------------------------------------------------------|
|![loading-hyper](./img/04-loading-scene/hyper-loading-lucky-rooster.png)|![new-loading-hyper](./img/04-loading-scene/new-hyper-loading-gates-of-wealth.png)|
## Setup loading scene
To set up the loading scene, use the appropriate command from the `P4F Editor` package: `loading-hyper` or `new-loading-hyper`, depending on your requirements.
![Loading Hyper](./img/04-loading-scene/hyper-loading.png) ![New Loading Hyper](./img/04-loading-scene/new-hyper-loading.png)
Running either command will generate a complete loading scene, including both landscape and portrait layouts.
Once the scene is generated, you can customize it by positioning UI elements and assigning the appropriate assets.
![Loading Node Tree](./img/04-loading-scene/loading-node-tree.png)
One of the best features of these commands is that they can also automatically load all required assets for the loading scene.
If you run the command without setting up the assets, youll see an empty loading scene like this:
![Loading Raw Scene](./img/04-loading-scene/loading-raw-scene.png)
However, with a proper asset setup, the loading scene will appear fully populated, like this:
![Loading Full Assets Scene](./img/04-loading-scene/loading-full-assets-scene.png)
:::info
For detailed guidelines on how to set up loading assets, refer to the [Game Asset Structure](../category/game-asset-structure) manual.
:::
:::tip
For testing purposes, you dont need a full asset setup. \
Just set up the ***btn-start*** node in the Node Tree and youre good to go.
![Loading Button Setup](./img/04-loading-scene/loading-button-setup.png)
:::

View File

@ -1,26 +0,0 @@
---
sidebar_position: 1
---
# System Setup
## Overview
The **System** module provides global access to sprite frames and animation assets, enabling efficient resource management across the game.
## Sprite Frame Provider
The **SpriteFrameProvider** allows global access to sprite frames from anywhere in the codebase.
![Sprite Frame Provider](../img/05-main-scene/sprite-frame-provider.png)
**Setup Steps:**
1. Configure the **SpriteFrameProvider** to register sprite assets.
2. Ensure all sprite frames are added to the provider for global access.
## Animation Provider
The **Animation Provider** manages and exposes game-related animation assets globally.
![Animation Provider](../img/05-main-scene/animation-provider.png)
**Setup Steps:**
1. Register animation assets in the **Animation Provider**.
2. Verify that animations are correctly linked to their respective prefabs.

View File

@ -1,51 +0,0 @@
---
sidebar_position: 2
---
# Background Setup
## Overview
The background serves as the visual scenery behind gameplay elements, supporting both **Landscape** (Desktop and Mobile) and **Portrait** (Mobile only) orientations.
| Orientation | Desktop | Mobile |
|-------------|---------|--------|
| **Landscape** | ![Background Landscape](./img/02-background/bg-overview-landscape-1.png) | ![Background Landscape](./img/02-background/bg-overview-landscape-2.png) |
| **Portrait** | ![Background Portrait](./img/02-background/bg-overview-portrait-2.png) | ![Background Portrait](./img/02-background/bg-overview-portrait-1.png) |
## Asset Preparation
| Type | Assets | Description |
|------|--------|-------------|
| **Static** | ![Static Background](./img/02-background/bg-prepare-assets-static.png) | Required for all games. |
| **Animation** | ![Animated Background](./img/02-background/bg-prepare-assets-anim.png) | Optional, depending on game design. |
## Setup Steps
1. **Landscape Background**:
- Use the prepared sprite frame for the landscape background.
- ![Landscape Setup](./img/02-background/bg-setup-landscape.png)
2. **Portrait Background**:
- Use the prepared sprite frame for the mobile portrait background.
- ![Portrait Setup](./img/02-background/bg-setup-portrait.png)
3. **Animated Background** (if applicable):
- **Step 1**: Use the helper tool to generate animations from prepared assets.
- ![Helper Animation](./img/02-background/bg-setup-hepler-anim.png)
- ![Animation Provider](./img/02-background/bg-setup-anim-provider.png)
- **Step 2**: Configure spine animation settings:
- Enable **Is Loop** to ensure continuous playback.
- Set a **Static Sprite Frame** for display before the animation loads.
- ![Animation Setup 1](./img/02-background/bg-setup-anim-1.png)
- ![Animation Setup 2](./img/02-background/bg-setup-anim-2.png)
- **Step 3**: Add animation nodes:
- **Landscape**:
- Create an `Empty Node` named `anim-background-main-game`.
- Add the `animation-play-on-enable` component with the animation name from the **Animation Provider**.
- Add the `background-scaler` component to resize based on screen resolution.
- ![Landscape Animation](./img/02-background/bg-setup-anim-landscape.png)
- **Portrait**:
- Create an `Empty Node` named `mobile-background-anim-portrait`.
- Add the `mobile-portrait-background-ui-controller` and `orientation-ui-controller` components for mobile portrait display.
- Create a child `Empty Node` named `anim-background-main-game`.
- Add the `animation-play-on-enable` and `portrait-anim-background-scaler` components.
- ![Portrait Animation 1](./img/02-background/bg-setup-anim-portrait-1.png)
- ![Portrait Animation 2](./img/02-background/bg-setup-anim-portrait-2.png)

View File

@ -1,43 +0,0 @@
---
sidebar_position: 3
---
# Reel Slot Setup
## Overview
The reel slot system manages the core spinning mechanics of the game.
## Asset Preparation
- Add symbol textures and reel frames:
- ![Symbol Texture](../img/05-main-scene/add-symbol-texture.png)
- ![Reel Frame](../img/05-main-scene/add-reel-frame.png)
## Sprite Frame Provider
- Add symbols to the **SpriteFrameProvider** for global access.
- ![Sprite Frame Provider](../img/05-main-scene/sprite-frame-provider-reel-slot.png)
## Reel Frame
- Configure the reel frame:
- ![Reel Frame 1](../img/05-main-scene/add-reel-frame-2.png)
- ![Reel Frame 2](../img/05-main-scene/reel-frame.png)
## Configuration
Use the `reel-scroller-helper` to set up spinning behavior:
![Reel Scroller Helper](../img/05-main-scene/reel-scroller-helper.png)
| Property | Description | Example |
|----------|-------------|---------|
| **Cell Item Script Name** | Script attached to each cell item. | ![Cell Item Script](../img/05-main-scene/hyper-cell-item.png) |
| **Scroller Script Name** | Script handling spinning logic. | ![Scroller Script](../img/05-main-scene/scroller.png) |
| **Row Count x Reel Count** | Number of slot items per row and column. | ![Reel Row Column](../img/05-main-scene/reel-row-column.png) |
| **Cell Size** | Size of each cell. | ![Cell Size](../img/05-main-scene/cell-size.png) |
| **Cell Spacing** | Horizontal and vertical distance between cells. | - |
| **Cell Dim Color** | Dark color for non-winning cells during win animations. | ![Dim Cell Color](../img/05-main-scene/dim-cell-color.png) |
| **Top Count and Bot Count** | Additional cells at the top and bottom for spinning logic. | ![Cell Top Bottom](../img/05-main-scene/cell-top-bottom.png) |
## Generate Reel Panel
- Use the `reel-scroller-helper` to auto-generate the reel panel.
- ![Generate Panel](../img/05-main-scene/generate-panel.png)
**Tip**: Temporarily disable any popups covering the scene to view and edit reel slot components clearly.

View File

@ -1,37 +0,0 @@
---
sidebar_position: 4
---
# Spinning Panel Setup
## Overview
The spinning panel system includes the **reel slot panel** and additional panels: `landing-panel`, `tension-panel`, `present-win-cell-panel`, and `present-win-border-panel`.
## Panel Setup
- **Landing Panel**:
- ![Landing Panel](../img/05-main-scene/landing-panel.png)
- **Script**:
```jsx
SlottySetting.prototype._registerInjection = function () {
DIContainer.Register('landingGenerator', require('landing-generator'));
};
```
- **Present Win Cell Panel**:
- ![Present Win Cell Panel](../img/05-main-scene/present-win-cell-panel.png)
- **Present Win Border Panel**:
- ![Present Win Border Panel](../img/05-main-scene/present-win-border-panel.png)
- **Tension Panel**:
- ![Tension Panel](../img/05-main-scene/tension-panel.png)
- For custom size frames, set **sizeMode** to **Custom** and configure the static frame and size.
- ![Tension Custom Size](../img/05-main-scene/tension-panel-custom.png)
- **Check Toggle**: Ensure the general panel toggle is correctly set.
- ![Toggle Note](../img/05-main-scene/note-bug-tension.png)
- **Script**:
```jsx
SlottySetting.prototype._registerInjection = function () {
DIContainer.Register('tensionGenerator', require('tension-generator'));
};
```

View File

@ -1,41 +0,0 @@
---
sidebar_position: 5
---
# On Reel Win Point
## Overview
- The **Win Point Per Line** system displays win points for each payline, including scatter wins.
- The **All Win Point** system displays win point at center.
| Win Point Per Line | All Win Point |
| ------------------ | ------------- |
|![Win Point Overview](./img/05-on-reel-win-point/overview-1.png)|![Win Point Overview](./img/05-on-reel-win-point/overview-2.png)|
## Asset Preparation
1. Locate all template prefabs: `assets/core-assets/hyper-core/packages/on-reel-present-win-point/prefab`
2. Copy and paste them to the game assets location: `assets/game-assets/prefabs`
![Prepare Prefabs](./img/05-on-reel-win-point/prepare-assets-1.png)
3. Prepare fonts
![Prepare Fonts](./img/05-on-reel-win-point/prepare-assets-2.png)
## Setup
- Add the `on-reel-present-win-point`, `on-reel-present-all-win-point` prefab to the main scene.
- Set the **Label Position**, **Cell Item Size**, and **Defaut Font Size** according to the game design.
![Label Component](./img/05-on-reel-win-point/setup-win-per-line-1.png)
- Set the **Font** the prepared assets.
![Label Component](./img/05-on-reel-win-point/setup-win-per-line-2.png)
![Label Component](./img/05-on-reel-win-point/setup-all-win-point.png)
:::tip
Follow game design specifications for position and size.
:::

View File

@ -1,93 +0,0 @@
---
sidebar_position: 6
---
# Special Win System
## Overview
Special Wins are high-value reward events categorized by payout thresholds:
| Win Type | Trigger Threshold | Preview |
|----------|-------------------|---------|
| **Big Win** | Medium payout | ![Big Win](../img/05-main-scene/special-win-big.png) |
| **Super Win** | High payout | ![Super Win](../img/05-main-scene/special-win-super.png) |
| **Mega Win** | Maximum payout | ![Mega Win](../img/05-main-scene/special-win-mega.png) |
## Implementation
### Asset Preparation
- Components:
| Component | Purpose |
|-----------|---------|
| `hyper-special-win-initializer` | Initializes the system. |
| `hyper-present-special-win` | Manages animation sequences and display logic. |
| `hyper-special-win-label-point-effect` | Controls win amount visualization. |
- ![Component Architecture](../img/05-main-scene/special-win-in-game.png)
- **Coin Effect System**:
- Variants for different game theme:
| Submodule | Theme | Preview |
|-----------|-------|---------|
| `hyper-coin-shower-international` | International | ![International Coin](../img/05-main-scene/special-win-coin-international.png) |
| `hyper-coin-shower-chinese` | Chinese | ![Chinese Coin](../img/05-main-scene/special-win-coin-chinese.png) |
- **Static Assets**:
| Platform | Path | Preview |
|----------|------|---------|
| Desktop | `assets/textures/desktop/preloads/special-wins` | ![Desktop Assets](../img/05-main-scene/special-win-folder-desktop.png) |
| Mobile | `assets/textures/mobile/preloads/special-wins` | ![Mobile Assets](../img/05-main-scene/special-win-folder-mobile.png) |
### Animation Setup
1. **Animation Resources**:
- Path:
| Platform | Path | Preview |
|----------|------|---------|
| Desktop | `assets/textures/desktop/postloads/anim-special-win` | ![Desktop Animation](../img/05-main-scene/special-win-folder-desktop-anim.png) |
| Mobile | `assets/textures/mobile/postloads/anim-special-win` | ![Mobile Animation](../img/05-main-scene/special-win-folder-mobile-anim.png) |
2. **Animation Flow**:
```mermaid
graph TD
SW[Special Wins] --> BW[Big Win]
SW --> SPW[Super Win]
SW --> MW[Mega Win]
BW --> BWI[bigwin-in] --> BWL[bigwin-loop] --> BWO[bigwin-out]
SPW --> SPWI[superwin-in] --> SPWL[superwin-loop] --> SPWO[superwin-out]
MW --> MWI[megawin-in] --> MWL[megawin-loop] --> MWO[megawin-out]
classDef inStage fill:#e6f3ff,stroke:#666,color:#000
classDef loopStage fill:#fff2cc,stroke:#666,color:#000
classDef outStage fill:#f8cecc,stroke:#666,color:#000
classDef winType fill:#d5e8d4,stroke:#82b366,color:#000
classDef specialWin fill:#fff4dd,stroke:#ff0000,color:#000
class BWI,SPWI,MWI inStage
class BWL,SPWL,MWL loopStage
class BWO,SPWO,MWO outStage
class BW,SPW,MW winType
class SW specialWin
linkStyle default stroke-width:2px,stroke:#ff0000
```
- ![Type Names](../img/05-main-scene/special-win-type-name.png)
3. **Animation Settings**:
- Configure static fallback and loop animations:
| Setting | Example |
|---------|---------|
| Static Fallback | ![Static Fallback](../img/05-main-scene/special-win-static.png) |
| Loop Animation | ![Loop Animation](../img/05-main-scene/special-win-loop.png) |
4. **Font Configuration**:
- Path: `assets/game-assets/fonts/preloads/main-game/fnt-special-win`
- Steps:
1. Import font files.
- ![Font Packaging](../img/05-main-scene/special-win-pack-font.png)
2. Add font to the special win component.
- ![Font Integration](../img/05-main-scene/special-win-font.png)
3. Configure text alignment, font size, and spacing.
- ![Font Layout](../img/05-main-scene/special-win-font-align.png)
**Tip**:
- Move assets to `custom-scale/` to resolve image quality issues.
- Customize font styles based on game design.
- [View Platform Asset Structure](/docs/category/game-asset-structure)

View File

@ -1,63 +0,0 @@
---
sidebar_position: 7
---
# Item Description
## Overview
The **Item Description** system provides detailed information about game items, including payouts and descriptions.
![Item Description Overview](./img/07-item-description/overview.png)
## Asset Preparation
| Assets | Description |
|--------|-------------|
| ![Background](./img/07-item-description/prepare-assets-1.png) | Background setup. |
| ![Static Symbol](./img/07-item-description/prepare-assets-2.png) | Static symbol setup. |
| ![Animation Symbol](./img/07-item-description/prepare-assets-3.png) | Animation symbol setup. |
| ![Payout/Description](./img/07-item-description/prepare-assets-4.png) | Payout or description text setup. |
## Setup
1. **Locate Template Prefabs**:
- Search for the `template-item-description` prefab.
- ![Locate Prefabs](./img/07-item-description/prepare-prefabs-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/07-item-description/prepare-prefabs-2.png)
### Prefab Configurations
- **item-description-small** (Items with win payout only):
- ![Overview](./img/07-item-description/setup-item-small-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-small-1.png) |
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. | ![Step 2](./img/07-item-description/setup-item-small-2.png) |
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. | ![Step 3](./img/07-item-description/setup-item-small-3.png) |
| 4 | Adjust **Color**, **Font**, and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/07-item-description/setup-item-small-4.png) |
- **item-description-no-odds** (Items with description only):
- ![Overview](./img/07-item-description/setup-item-no-odds-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-no-odds-1.png) |
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. | ![Step 2](./img/07-item-description/setup-item-no-odds-2.png) |
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. | ![Step 3](./img/07-item-description/setup-item-no-odds-3.png) |
| 4 | Set **String**, **Color**, **Font**, and **Font Size** in `description`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/07-item-description/setup-item-no-odds-4.png) |
- **item-description-big** (Items with both payout and description):
- ![Overview](./img/07-item-description/setup-item-big-overview.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Sprite Frame** in `background` using prepared assets. | ![Step 1](./img/07-item-description/setup-item-big-1.png) |
| 2 | Follow **Step 4** of `item-description-small` for payout setup. | [See Small Setup](#prefab-configurations) |
| 3 | Follow **Step 4** of `item-description-no-odds` for description setup. | [See No-Odds Setup](#prefab-configurations) |
**Tip**:
- Use the helper tool to configure:
1. Set **Content Size** and **Cell Item Size** per game design.
2. Use prepared bitmap fonts for **Labels**.
3. Click **Set Size** to run the helper.
4. Configure **Background**, **Sprite Frame**, **Animation**, **Payout**, and **Description** using prepared assets.
- ![Helper Setup](./img/07-item-description/setup-item-helper.png)

View File

@ -1,74 +0,0 @@
---
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)

View File

@ -1,98 +0,0 @@
---
sidebar_position: 9
---
# Info Pages
## Overview
**Info Pages** provide players with details about game rules, features, symbols, payout structures, and mechanics. They are divided into **Paytable** and **Rules** sections, with different layouts for Desktop and Mobile.
| Platform | Desktop | Mobile |
|----------|---------|--------|
| Paytable/Rules | ![Desktop 1](./img/09-info-pages/overview-desktop-1.png)<br/>![Desktop 2](./img/09-info-pages/overview-desktop-2.png)<br/>![Desktop 3](./img/09-info-pages/overview-desktop-3.png) | ![Mobile 1](./img/09-info-pages/overview-mobile-1.png)<br/>![Mobile 2](./img/09-info-pages/overview-mobile-2.png) |
## Asset Preparation
| Assets | Description |
|--------|-------------|
| ![Rules Asset](./img/09-info-pages/prepare-assets-1.png) | Used for **Rules** or RichText images. |
| ![Paytable Asset](./img/09-info-pages/prepare-assets-2.png) | Used for **Paytable** setup. |
## Desktop Setup
1. **Locate Template Prefabs**:
- Search for the `desktop-hyper-info-panel` prefab.
- ![Locate Prefabs](./img/09-info-pages/prepare-prefabs-desktop-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/09-info-pages/prepare-prefabs-desktop-2.png)
### desktop-info-panel
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Change **Color** in `page-background` per game design. | ![Step 1](./img/09-info-pages/configure-panel-1.png) |
| 2 | Change **Color** in `menu-header-background` per game design. | ![Step 2](./img/09-info-pages/configure-panel-2.png) |
| 3 | Update **Prefab** in `paytable-content` using prepared prefabs. | ![Step 3](./img/09-info-pages/configure-panel-3.png) |
| 4 | Update **Prefab** in `rules-content` using prepared prefabs. | ![Step 4](./img/09-info-pages/configure-panel-4.png) |
### desktop-paytable-content
- **Item with Payout**:
- ![Paytable Payout](./img/09-info-pages/configure-paytable-1.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Item Name** and **Odds Items** per game design. | ![Step 1](./img/09-info-pages/configure-item-payout-1.png) |
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. | ![Step 2](./img/09-info-pages/configure-item-payout-2.png) |
| 3 | Change **Color** in `multi-x...` and `odds-x...` per game design. | ![Step 3](./img/09-info-pages/configure-item-payout-3.png) |
| 4 | Adjust **Font** and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. | ![Step 4](./img/09-info-pages/configure-item-payout-4.png) |
- **Item with Description**:
- ![Paytable Description](./img/09-info-pages/configure-paytable-2.png)
- Steps:
| Step | Action | Image Reference |
|------|--------|-----------------|
| 1 | Set **Name** per game design. | ![Step 1](./img/09-info-pages/configure-item-description-1.png) |
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. | ![Step 2](./img/09-info-pages/configure-item-description-2.png) |
| 3 | Change **String** in `description` per game design. | ![Step 3](./img/09-info-pages/configure-item-description-3.png) |
- **Feature Game**:
- Configure based on game features (e.g., **FREESPIN BONUS**, **BONUS FEATURE**):
- **Title**: Update **String** and **Color** in `freespins-bonus-title`.
- **Image**: Set **Sprite Frame** in `freespins-bonus-image-...` using prepared assets.
- **Description**: Update **String** in `freespins-bonus-description`.
- ![Feature Overview](./img/09-info-pages/configure-feature-game-1.png)
- ![Feature Configure](./img/09-info-pages/configure-feature-game-2.png)
- ![Feature Overview 2](./img/09-info-pages/configure-feature-game-3.png)
- ![Feature Configure 2](./img/09-info-pages/configure-feature-game-4.png)
### desktop-rules-content
- Types: **Lines** or **Ways**.
- Steps:
1. Set **Sprite Frame** in `lines-image` using prepared assets.
2. Change **Color** in `lines-title` per game design.
3. For **Ways**:
- Update **String** in `lines-title` to **WIN WAYS/DYNAWAYS**.
- Enable and update **String** in `lines-description`.
- ![Rules Overview](./img/09-info-pages/configure-rules-1.png)
- ![Rules Configure](./img/09-info-pages/configure-rules-2.png)
- ![Rules Overview 2](./img/09-info-pages/configure-rules-3.png)
- ![Rules Configure 2](./img/09-info-pages/configure-rules-4.png)
## Mobile Setup
1. **Locate Template Prefabs**:
- Search for the `mobile-ui` prefab.
- ![Locate Prefabs](./img/09-info-pages/prepare-prefabs-mobile-1.png)
2. **Clone Assets**:
- Copy and paste to the game assets location, removing unnecessary prefixes.
- ![Clone Prefabs](./img/09-info-pages/prepare-prefabs-mobile-2.png)
3. **Configure Prefabs**:
- Configure `mobile-paytable-content` and `mobile-rules-content` as described in [Desktop Setup](#desktop-setup).
4. **Spawner Positions**:
- For **Paytable**: Use `mobile-paytable-content-spawner` in the `mobile-ui` prefab.
- ![Paytable Spawner](./img/09-info-pages/configure-prefab-mobile-1.png)
- For **Rules**: Use `mobile-rule-content-spawner` in the `mobile-ui` prefab.
- ![Rules Spawner](./img/09-info-pages/configure-prefab-mobile-2.png)
**Tip**:
- If the game has a server, verify config settings:
1. Open DevTools, navigate to the **Network** tab, and find the message with **event** = "config".
2. Compare **paytable** values with the configured setup.
- ![Config Settings](./img/09-info-pages/prepare-setting-config.png)

View File

@ -1,58 +0,0 @@
---
sidebar_position: 10
---
# Desktop Bottom Bar UI
## Overview
The **Bottom Bar UI** provides a functional interface for gameplay controls on desktop, using a horizontal layout to maximize screen width.
![Desktop Bottom Bar](../img/05-main-scene/bottom-ui-desktop.png)
## Implementation
1. **Set Up Prefab Editor**:
- **Locate Prefab**:
- Search for `ui-bottom-bar-panel` prefab.
- ![Locate Prefab](../img/05-main-scene/add-texture-bottom-bar-prefab.png)
- **Find Assets**:
- Navigate to `core/editor` directory.
- ![Core Directory](../img/05-main-scene/add-texture-label-prefab.png)
- **Clone Assets**:
- Copy and paste to the game assets location.
- ![Asset Placement](../img/05-main-scene/editor-texture-label-prefab.png)
2. **Configure Prefabs**:
- **Core Prefabs Structure**:
- Path: `assets/core-assets/hyper-core/packages/ui/desktop-ui/prefabs`
- ![Directory Structure](../img/05-main-scene/add-texture-bottom-bar-prefab2.png)
- **Rename Prefabs**:
- Remove unnecessary prefixes:
| Prefix to Remove | Original Name | Final Name |
|------------------|---------------|------------|
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
- ![Rename Example](../img/05-main-scene/rename-prefab.png)
- **Customize `button-auto-selection` Label**:
- Use `template-label-auto-selection` to adjust appearance.
- Add **Label Outline** and **Label Shadow** for better readability.
- ![Label Options](../img/05-main-scene/option-for-label.png)
- **Customize `ui-bottom-bar-panel` Label**:
- Use `assets/game-assets/editor/bottom-ui/template-label-title`.
- Include a localization component for multi-language support.
- ![Localization Component](../img/05-main-scene/component-locale.png)
- **FormatText Properties**:
| Property | Description | Example |
|----------|-------------|---------|
| `default` | Initial formatting state | `false` |
| `notify` | Formatting update callback | Updates when value changes |
3. **Set Up UI in Main Scene**:
- Create a new node and configure in the main scene.
- ![Main Scene Setup](../img/05-main-scene/set-positon-bottom-bar.png)
4. **Apply Textures**:
- Ensure assets for bottom UI and button UI text are complete.
- ![Texture Setup](../img/05-main-scene/prepare-ui-bottom-bar.png)
5. **Run Helper Tool**:
- Configure the bottom bar UI using the helper tool.

View File

@ -1,96 +0,0 @@
---
sidebar_position: 11
---
# Mobile UI Panel
## Overview
The Mobile UI provides a responsive interface for gameplay controls, adapting to both **Landscape** and **Portrait** orientations on mobile devices.
| Orientation | Preview |
|-------------|---------|
| Landscape | ![Mobile Landscape](../img/05-main-scene/menu-landscape.png) |
| Portrait | ![Mobile Portrait](../img/05-main-scene/menu-portrait.png) |
## Implementation
### Step 1: Set Up Prefabs
Configure the necessary prefabs for the Mobile UI.
| Step | Action | Description | Image Reference |
|------|--------|-------------|-----------------|
| 1 | Locate `mobile-ui` Prefab | Search for the `mobile-ui` prefab in the project assets. | ![Locate Prefabs](../img/05-main-scene/search-mobile-ui.png) |
| 2 | Clone Assets | Copy the required assets to the game assets directory. | ![Asset Placement](../img/05-main-scene/mobile-ui-prefab.png) |
| 3 | Paste Assets | Paste into: `assets/game-assets/prefabs/mobile`. | - |
| 4 | Locate `buy-feature` Prefab | Search for the `buy-feature` prefab. | ![Locate Prefabs](../img/05-main-scene/buy-feature-bonus-mobile.png) |
| 5 | Paste Prefab | Paste into: `assets/game-assets/prefabs/mobile`. | - |
**Tip**: Maintain the following directory structure for proper prefab references:
```
assets/
└── game-assets/
└── prefabs/
└── mobile/
├── mobile-ui.prefab
└── buy-feature.prefab
```
### Step 2: Rename Prefabs
Rename the copied prefabs by removing unnecessary prefixes to ensure consistency.
| Prefix to Remove | Example |
|------------------|---------|
| `template-` | ![Prefab Naming Example](../img/05-main-scene/result-rename-mobile.png) |
### Step 3: Configure UI in Main Scene
Add and configure a new node in the main scene to integrate the Mobile UI.
![Main Scene Setup](../img/05-main-scene/set-positon-mobile-ui.png)
**Platform Node Spawner Settings**:
### Step 4: Apply Textures
Ensure all Mobile UI assets are prepared and applied correctly.
![Texture Setup](../img/05-main-scene/add-texture-mobile-ui.png)
**Run the Helper Tool**:
- Use the Mobile UI helper tool to configure the UI components.
### Step 5: Set Color Theme for Mobile UI
Customize the color theme for the Mobile UI using the `helper-paint-color-ui-mobile.js` component to apply theme-based colors across UI elements.
**Follow Design**:
| Landscape | Portrait |
|-----------|----------|
| ![Landscape Menu](../img/05-main-scene/menu-landscape.png) | ![Portrait Menu](../img/05-main-scene/menu-portrait.png) |
**Configuration Steps**:
1. **Access the Helper Component**:
- Locate the `helper-paint-color-ui-mobile.js` component in the node inspector.
- ![Color Setup](../img/05-main-scene/set-color-menu-ui.png)
2. **Configure Color Properties**:
- Adjust the following properties to match the game design:
| # | Property | Description | Example |
|---|----------|-------------|---------|
| 0 | **Paint Color** | Triggers repainting of UI components. | ![Paint Color Trigger](../img/05-main-scene/image-for-mobile-ui-helper/paint-color-trigger.png) |
| 1 | **Main UI Normal Color** | Default color for UI elements (e.g., Buy, Close, Auto). | ![Main UI Examples](../img/05-main-scene/image-for-mobile-ui-helper/buy.png) |
| 2 | **Main UI Highlight Color** | Color for highlighted or selected UI elements. | ![Highlight Color](../img/05-main-scene/main-ui-highlight-color.png) |
| 3 | **Toggle State Off Color** | Color for toggles in the off state. | ![Toggle Off](../img/05-main-scene/toggle-off.png) |
| 4 | **Toggle State On Color** | Color for toggles in the on state. | ![Toggle On](../img/05-main-scene/toggle-on.png) |
| 5 | **Background Info Page Color** | Background color for info pages. | ![Info Page Background](../img/05-main-scene/image-for-mobile-ui-helper/background-info.png) |
| 6 | **Background Menu Color** | Background color for menus. | ![Menu Background](../img/05-main-scene/image-for-mobile-ui-helper/background-menu.png) |
| 7 | **Background Point Panel Color** | Background color for point/balance panels. | ![Point Panel Background](../img/05-main-scene/image-for-mobile-ui-helper/background-win-point.png) |
| 8 | **Background Bottom Bar Color** | Background color for the bottom bar (Portrait only). | ![Bottom Bar Background](../img/05-main-scene/image-for-mobile-ui-helper/background-bottom-bar.png) |
| 9 | **Button Quit Color** | Color for the Quit button. | ![Quit Button](../img/05-main-scene/btn-quit-game.png) |
| 10 | **Button Cancel Color** | Color for the Cancel button. | ![Cancel Button](../img/05-main-scene/btn-cancel-game.png) |
| 11 | **Label Balance Normal Color** | Color for the balance label in normal state. | ![Balance Normal](../img/05-main-scene/image-for-mobile-ui-helper/win-point-color.png) |
| 12 | **Label Balance Spin Color** | Color for the balance label during spins. | ![Balance Spin](../img/05-main-scene/image-for-mobile-ui-helper/spin-point-color.png) |
| 13 | **Button Plus/Minus Auto Color** | Color for Plus/Minus buttons in autoplay. | ![Plus/Minus Buttons](../img/05-main-scene/image-for-mobile-ui-helper/btn-plus-minus-auto.png) |
| 14 | **Label Start Auto Color** | Color for the Start Autoplay label. | ![Start Auto Label](../img/05-main-scene/image-for-mobile-ui-helper/button%20start.png) |
| 15 | **Label Outline Notification** | Outline color and width for notifications. | ![Outline Notification](../img/05-main-scene/image-for-mobile-ui-helper/outline-notifcation.png) |
| 16 | **Total Win Medium Win Color** | Color for medium win labels. | ![Medium Win Color](../img/05-main-scene/image-for-mobile-ui-helper/win-point-special-color.png) |
**Tip**: Ensure color values align with the games visual design specifications.

View File

@ -1,48 +0,0 @@
---
sidebar_position: 12
---
# Popup Panel
## Overview
The **Popup Panel** is a temporary UI element that overlays the main game content to display additional information or user options, such as exit prompts or disconnection notices.
| Exit Popup | Disconnect Popup | Free Rounds Popup |
|------------|------------------|--------------|
| ![Exit Popup](../img/05-main-scene/popup-exit-game.png) | ![Disconnect Popup](../img/05-main-scene/popup-disconnet.png) | ![Free Rounds Popup](../img/05-main-scene/freeround-counter/freerounds-international.png) |
## Multiple Popup Panel
The **Multiple Popup Panel** is pre-integrated into the main scene via the `template-main-game` prefab, allowing multiple popups to be managed efficiently.
![Popup in Game](../img/05-main-scene/popup-panel-in-game.png)
**Base Settings**:
- **Prefab**: `hyper-multiple-popup.prefab`
- **Path**: `assets/core-assets/hyper-core/packages/popup-panel/prefabs/hyper-multiple-popup.prefab`
- **Configuration**: Reference the prefab in the main scene to enable multiple popup layouts.
- ![Popup Configuration](../img/05-main-scene/popup-multi.png)
## Manual Popup Panel
Manually configured popups allow for custom textures and layouts, tailored to the games design. Note that the **Exit Game** popup is exclusive to the Desktop platform.
**Setup Steps**:
1. **Prepare Assets**:
- **Path**: `assets/game-assets/textures/desktop/preloads/main-game/exit`
- **Example**: ![Exit Game Popup Assets](../img/05-main-scene/exit-popup-game.png)
2. **Configure Prefabs**:
- Locate and clone the popup prefab to `assets/game-assets/prefabs`.
- Structure the prefab as shown:
- ![Prefab Structure](../img/05-main-scene/popup-exit-in-game.png)
3. **Apply Textures**:
- Manually drag and drop images onto the corresponding nodes in the editor.
- ![Texture Application](../img/05-main-scene/popup-draw.png)
4. **Preview Result**:
- Verify the popup displays correctly in the game.
- ![Popup Preview](../img/05-main-scene/popup-exit-game.png)
**Tip**:
- Ensure textures align with the games color theme and design specifications.
- Test the popup on Desktop to confirm functionality for the Exit Game feature.

View File

@ -1,117 +0,0 @@
---
sidebar_position: 13
---
# Game Logo
## Overview
The **Game Logo** is a key branding element displayed consistently across all platforms and orientations to reinforce the games identity.
| Platform | Orientation | Preview |
|----------|-------------|---------|
| Desktop | Standard | ![Desktop View](../img/05-main-scene/logo-overview-desktop.png) |
| Mobile | Landscape | ![Landscape View](../img/05-main-scene/logo-overview.png) |
| Mobile | Portrait | ![Portrait View](../img/05-main-scene/logo-overview-portrait.png) |
## Implementation
### Prepare Assets
#### 1. Core Setup
- **Location**: `assets/core-assets/hyper-core/packages/hyper-logo-animation`
- **Script**: Initialize animation states for the logo.
```typescript
// File: assets/core-assets/hyper-core/packages/logo-animation/hyper-logo-animation.js
onLoad: function () {
const self = this;
// Initialize animation states
self.animPlay = AnimationProvider.Instance.GetAnimation('anim-logo-play');
self.animIdle = AnimationProvider.Instance.GetAnimation('anim-logo-idle');
}
```
#### 2. Required Assets
**Static Assets**:
| Platform | Location | Preview |
|----------|----------|---------|
| Desktop | `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` | ![Desktop Static](../img/05-main-scene/logo-static-desktop.png) |
| Mobile | `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` | ![Mobile Static](../img/05-main-scene/logo-static-mobile.png) |
**Animation Assets**:
| Platform | Location | Preview |
|----------|----------|---------|
| Desktop | `assets/game-assets/textures/desktop/postloads/main-game/animations` | ![Desktop Animation](../img/05-main-scene/logo-anim-desktop.png) |
| Mobile | `assets/game-assets/textures/mobile/postloads/main-game/animations` | ![Mobile Animation](../img/05-main-scene/logo-anim-mobile.png) |
#### 3. Animation Settings
1. **Configure Animation Provider**:
- Register the logo animations in the Animation Provider.
- ![Provider Setup](../img/05-main-scene/logo-anim-provider.png)
2. **Set Up Animation States**:
- Enable a static frame for the loading state in `anim-logo-play` and `anim-logo-idle`.
- ![Static Frame Setup](../img/05-main-scene/logo-static-in-anim.png)
- Configure continuous loop playback for animations.
- ![Loop Setup](../img/05-main-scene/logo-anim-loop.png)
### Setup
#### Desktop Configuration
1. **Base Settings**:
- Configure the logo node in the main scene.
- ![Desktop Settings](../img/05-main-scene/logo-setting-desktop.png)
2. **Node Setup**:
- Add the `hyper-logo-animation` component to the logo node.
- ```typescript
Components: {
animation: 'hyper-logo-animation',
}
```
- ![Desktop Setup](../img/05-main-scene/logo-script-desktop.png)
**Tip**: Adjust position and size according to the game design specifications.
#### Mobile Configuration
##### Landscape Mode
1. **Node Setup**:
- Configure the logo node with the following components:
| Component | Description |
|-----------|-------------|
| `hyper-logo-animation` | Plays and manages the logo animation. |
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
| `landscape-logo-spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
- ![Landscape Setup](../img/05-main-scene/logo-mobile-landcape.png)
##### Portrait Mode
1. **Node Setup**:
- Configure the logo node with the following components:
| Component | Description |
|-----------|-------------|
| `hyper-logo-animation` | Plays and manages the logo animation. |
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
| `spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
- ![Portrait Setup](../img/05-main-scene/logo-mobile-portrait.png)
2. **Position Settings**:
- Adjust logo position based on jackpot state:
| State | Position | Example |
|-------|----------|---------|
| Jackpot Active | Upper position | ![Jackpot Active](../img/05-main-scene/logo-portrait-jackpot.png) |
| Jackpot Inactive | Default position | ![Jackpot Inactive](../img/05-main-scene/logo-portrait-no-jackpot.png) |
3. **Size Settings**:
- Use the `spine-aspect-ratio-keeper` component to maintain logo proportions.
- ![Size Configuration](../img/05-main-scene/logo-center-align.png)
- **Settings**:
| Setting | Description | Default Value |
|---------|-------------|---------------|
| **Default Scale** | Initial scale factor for the node. | Configurable (e.g., 1.0) |
| **Default Size** | Base width and height for scaling. | Configurable (e.g., 1050 x 1680) |
**Tip**:
- Test the static logo display under slow network conditions to ensure fallback works.
- Verify animation states (`play` and `idle`) for smooth transitions.
- [See More Info](/docs/category/game-asset-structure)

View File

@ -1,61 +0,0 @@
---
sidebar_position: 15
---
# Jackpot Panel
## Overview
The **Jackpot Feature** offers multiple prize tiers, each with increasing value, providing players with frequent smaller wins and the chance for a large top prize. The panel is responsive, supporting both desktop and mobile layouts.
**Jackpot Tiers**:
| Tier | Description | Preview |
|------|-------------|---------|
| Grand | The top prize, rare and often worth thousands or millions (progressive). | ![Grand Jackpot](../img/05-main-scene/jackpot-panel/jackpot-grand.png) |
| Major | A significant prize, less frequent but substantial. | ![Major Jackpot](../img/05-main-scene/jackpot-panel/jackpot-major.png) |
| Minor | A moderately valuable prize, relatively common. | ![Minor Jackpot](../img/05-main-scene/jackpot-panel/jackpot-minor.png) |
| Mini | The smallest prize, easiest to win. | ![Mini Jackpot](../img/05-main-scene/jackpot-panel/jackpot-mini.png) |
**Platform Support**:
| Orientation | Preview |
|-------------|---------|
| Desktop | ![Desktop Jackpot](../img/05-main-scene/jackpot-panel/jackpot-desktop.png) |
| Mobile | ![Mobile Jackpot](../img/05-main-scene/jackpot-panel/jackpot-mobile.png) |
## Implementation
### Prepare Assets
- **Prefab Location**:
- Path: `assets/core-assets/jackpot-package/prefabs`
- Example: ![Core Prefabs](../img/05-main-scene/jackpot-panel/jackpot-core-prefabs.png)
### Setup
#### Jackpot Runner
##### Desktop
1. **Add Node**:
- Integrate the jackpot node into the main scene.
- ![Desktop Setup](../img/05-main-scene/jackpot-panel/jackpot-in-desktop.png)
##### Mobile
1. **Configure Node**:
- Set up the jackpot node for both landscape and portrait orientations.
- Use `UI Mobile Landscape Position` and `UI Mobile Portrait Position` components for responsiveness.
- ![Mobile Setup](../img/05-main-scene/jackpot-panel/jackpot-in-mobile.png)
2. **Platform Node Spawner**:
- Example: ![Mobile Spawner](../img/05-main-scene/jackpot-panel/jackpot-in-mobile-spawner.png)
#### Result Panel
- Ensure the jackpot panel displays correctly across all platforms and orientations.
- ![Result Panel](../img/05-main-scene/jackpot-panel/jackpot-positon-result.png)
**Tip**: Follow the game design layout for positioning and sizing.
## Game Result Examples
| Win Tier | Example |
|----------|---------|
| Grand | ![Grand Win](../img/05-main-scene/jackpot-panel/jackpot-grand-win.jpg) |
| Major | ![Major Win](../img/05-main-scene/jackpot-panel/jackpot-major-win.jpg) |
| Minor | ![Minor Win](../img/05-main-scene/jackpot-panel/jackpot-minor-win.jpg) |
| Mini | ![Mini Win](../img/05-main-scene/jackpot-panel/jackpot-mini-win.jpg) |

View File

@ -1,64 +0,0 @@
---
sidebar_position: 16
---
# Idle Animation
## Overview
The **Idle Animation** enhances the visual appeal of the game by animating slot symbols during idle states, providing a dynamic and engaging experience.
| Static Preview | Animated Preview |
|--------|-------------|
| ![Idle Static](./img/16-idle-animation/overview.png) | ![Idle Animation](./img/16-idle-animation//overview.gif) |
## Prepare the assets
| Assets | Description |
|--------|-------------|
| ![Static Asset](./img/16-idle-animation/prepare-assets-1.png) | Static sprite frame for the idle state. |
| ![Animation Asset](./img/16-idle-animation/prepare-assets-2.png) | Animation assets for the idle animation. |
## Setup Idle Animation
### Configure Settings
Create a script to register the idle animation components with the dependency injection container.
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
var BaseSlottySetting = p4fslot.require('slotty-setting');
var DIContainer = p4fcore.require('di-container');
BaseSlottySetting.prototype._registerInjection = function () {
DIContainer.Register('cellItemRender', require('idle-cell-item-render'));
DIContainer.Register('idleAnimationHandler', require('idle-animation-handler'));
};
```
### Setup Animations
1. Using hepler to generate animation using the prepared assets
![Background Setup Helper Anim](./img/16-idle-animation/setup-anim-helper-1.png)
![Background Setup Helper Anim](./img/16-idle-animation/setup-anim-helper-2.png)
2. Configure Spine Animation
- Set **Is Loop** ✅.
- Setup the **Static Sprite Frame** using the prepared assets.
![Background Setup Animation](./img/16-idle-animation/setup-anim-1.png)
### Configure Scene
1. **Locate Prefab**:
- Search for the `idle-animation-panel` prefab.
2. **Add to Scene**:
- Drag the prefab into the main scene.
3. **Generate Panel**:
- Click **Generate Panel** to set up the animation panel.
-![Locate Prefabs](./img/16-idle-animation/configure-scene-1.png)
:::warning
When using prefabs directly from `core-assets`, convert them to a **Regular Node** to avoid reference issues.
![Locate Prefabs](./img/16-idle-animation/configure-scene-warning.png)
:::
**Tip**: Test the idle animation in the game to ensure smooth playback and proper looping.

Some files were not shown because too many files have changed in this diff Show More