Merge pull request 'feature/add-doc-controller' (#96) from feature/add-doc-controller into develop
Reviewed-on: #96 Reviewed-by: Pham Huynh Duc Huy <huy.pham@mercurystudiogroup.com>
This commit is contained in:
commit
5e7d8fdf4b
@ -7,6 +7,5 @@ sidebar_position: 0
|
|||||||
|
|
||||||
## Slot Game Machine
|
## Slot Game Machine
|
||||||
* [Initialize Controller](slot-machine/initialize-controller)
|
* [Initialize Controller](slot-machine/initialize-controller)
|
||||||
* [Balance Controller](slot-machine/balance)
|
* [Balance](category/balance)
|
||||||
* [Bet Controller](slot-machine/bet-controller)
|
* [Bet](category/bet)
|
||||||
To be written
|
|
18
api-doc/slot-machine/auto-spin/_category_.json
Normal file
18
api-doc/slot-machine/auto-spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 5,
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
352
api-doc/slot-machine/auto-spin/auto-spin-controller.md
Normal file
352
api-doc/slot-machine/auto-spin/auto-spin-controller.md
Normal file
@ -0,0 +1,352 @@
|
|||||||
|
---
|
||||||
|
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)|
|
307
api-doc/slot-machine/auto-spin/auto-spin-model.md
Normal file
307
api-doc/slot-machine/auto-spin/auto-spin-model.md
Normal file
@ -0,0 +1,307 @@
|
|||||||
|
---
|
||||||
|
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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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 |
|
||||||
|
| 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)
|
15
api-doc/slot-machine/auto-spin/auto-spin-view.md
Normal file
15
api-doc/slot-machine/auto-spin/auto-spin-view.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
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)
|
||||||
|
|
@ -8,7 +8,7 @@ sidebar_position: 2
|
|||||||
### Properties
|
### Properties
|
||||||
* [savedCurrentPoint](#savedcurrentpoint) `Number` Current played bet.
|
* [savedCurrentPoint](#savedcurrentpoint) `Number` Current played bet.
|
||||||
* [savedFreePoint](#savedfreepoint) `Number` Current free point played bet.
|
* [savedFreePoint](#savedfreepoint) `Number` Current free point played bet.
|
||||||
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming or not.
|
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming.
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ sidebar_position: 2
|
|||||||
* [SetFreePoint](#setfreepoint) Set current free point.
|
* [SetFreePoint](#setfreepoint) Set current free point.
|
||||||
* [GetFreePoint](#getfreepoint) Get current free point.
|
* [GetFreePoint](#getfreepoint) Get current free point.
|
||||||
* [GetAvailablePoint](#getavalablepoint) Get current point.
|
* [GetAvailablePoint](#getavalablepoint) Get current point.
|
||||||
* [isNumber](#isnumber) Indicates whether the value is number or not.
|
* [isNumber](#isnumber) Indicates whether the value is number.
|
||||||
|
|
||||||
## Details
|
## Details
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ sidebar_position: 2
|
|||||||
| 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)|
|
| 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
|
#### isNumber
|
||||||
> Indicates whether the value is number or not.<br/>
|
> Indicates whether the value is number.<br/>
|
||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
|
@ -1,99 +0,0 @@
|
|||||||
---
|
|
||||||
sidebar_position: 3
|
|
||||||
---
|
|
||||||
|
|
||||||
# Bet Controller
|
|
||||||
|
|
||||||
## Index
|
|
||||||
|
|
||||||
### Properties
|
|
||||||
* [isHistoryActivated](#ishistoryactivated) `Boolean` Current played bet.
|
|
||||||
* [availablePoint](#availablepoint) `Number` Current played bet.
|
|
||||||
* [waiterAutoSpin](#waiterautospin) `Timer` Current played bet.
|
|
||||||
* [betProcessorFactory](#betprocessorfactory) `BetProcessorFactory` Current played bet.
|
|
||||||
* [betProcessor](#betprocessor) `BetProcessor` Current played bet.
|
|
||||||
|
|
||||||
### Methods
|
|
||||||
|
|
||||||
* [CalculateTotalBet](#calculatetotalbet) Register events to get data from server.
|
|
||||||
* [onChangeBetMode](#onchangebetmode) Start game when connected succesfully.
|
|
||||||
* [getClampedBet](#getclampedbet) Set resume data when connected server.
|
|
||||||
* [_start](#_start) Send request data to server.
|
|
||||||
* [_registerEvent](#_registerevent) Start game when connected succesfully with resume data.
|
|
||||||
* [_complete](#_complete) Start game when connected succesfully with resume data.
|
|
||||||
* [setBetPoints](#setbetpoints) Set resume data when connected server.
|
|
||||||
* [setBetPoint](#setbetpoint) Set resume data when connected server.
|
|
||||||
* [notifyBetDataChanged](#notifybetdatachanged) Set resume data when connected server.
|
|
||||||
* [onAutoSpinDeactivated](#onautospindeactivated) Set resume data when connected server.
|
|
||||||
* [onBetMultiplierReceived](#onbetmultiplierreceived) Set resume data when connected server.
|
|
||||||
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Set resume data when connected server.
|
|
||||||
* [onMiniGameDataReceived](#onminigamedatareceived) Set resume data when connected server.
|
|
||||||
* [onResumeOrReplayGameRound](#onresumeorreplaygameround) Set resume data when connected server.
|
|
||||||
* [onBalanceChanged](#onbalancechanged) Set resume data when connected server.
|
|
||||||
* [onReplayHistoryClient](#onreplayhistoryclient) Set resume data when connected server.
|
|
||||||
* [onResume](#onresume) Indicates the game current state is resuming.
|
|
||||||
* [onReplayHistory](#onreplayhistory) Indicates the game current state is resuming.
|
|
||||||
* [onHistoryActivated](#onhistoryactivated) Indicates the game current state is resuming.
|
|
||||||
* [onHistoryDeactivated](#onhistorydeactivated) Indicates the game current state is resuming.
|
|
||||||
* [onStartGame](#onstartgame) Show the client balance when the game is started.
|
|
||||||
* [onAutoSpinActivated](#onautospinactivated) Show the client balance when the game is started.
|
|
||||||
* [onSpinClicked](#onspinclicked) Show the client balance when the game is started.
|
|
||||||
* [onOutcomeSelected](#onoutcomeselected) Show the client balance when the game is started.
|
|
||||||
* [onBetPointChanged](#onbetpointchanged) Show the client balance when the game is started.
|
|
||||||
* [onBetMultiplierChanged](#onbetmultiplierchanged) Show the client balance when the game is started.
|
|
||||||
* [onPaylineCountChanged](#onpaylinecountchanged) Show the client balance when the game is started.
|
|
||||||
* [getTotalBetPoint](#gettotalbetpoint) Show the client balance when the game is started.
|
|
||||||
* [spin](#spin) Show the client balance when the game is started.
|
|
||||||
* [onManualBuyBonusOpened](#onmanualbuybonusopened) Show the client balance when the game is started.
|
|
||||||
* [onManualBuyBonusClosed](#onmanualbuybonusclosed) Show the client balance when the game is started.
|
|
||||||
* [onManualBuyBonusChanged](#onmanualbuybonuschanged) Show the client balance when the game is started.
|
|
||||||
* [setBetByPowerPlayModel](#setbetbypowerplaymodel) Show the client balance when the game is started.
|
|
||||||
|
|
||||||
## Details
|
|
||||||
|
|
||||||
#### isHistoryActivated
|
|
||||||
> Current played bet.<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
|
|
||||||
> Register events to get data from server.<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
|
|
||||||
> Send request data to server.<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
|
|
||||||
> Set resume data when connected server.<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
|
|
||||||
> Set resume data when connected server.<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
|
|
||||||
> Start game when connected succesfully.<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)|
|
|
18
api-doc/slot-machine/bet/_category_.json
Normal file
18
api-doc/slot-machine/bet/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
332
api-doc/slot-machine/bet/bet-controller.md
Normal file
332
api-doc/slot-machine/bet/bet-controller.md
Normal file
@ -0,0 +1,332 @@
|
|||||||
|
---
|
||||||
|
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)|
|
288
api-doc/slot-machine/bet/bet-model.md
Normal file
288
api-doc/slot-machine/bet/bet-model.md
Normal file
@ -0,0 +1,288 @@
|
|||||||
|
---
|
||||||
|
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)|
|
19
api-doc/slot-machine/bet/bet-view.md
Normal file
19
api-doc/slot-machine/bet/bet-view.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
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)|
|
18
api-doc/slot-machine/end-round/_category_.json
Normal file
18
api-doc/slot-machine/end-round/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 6,
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
68
api-doc/slot-machine/end-round/end-round-controller.md
Normal file
68
api-doc/slot-machine/end-round/end-round-controller.md
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
---
|
||||||
|
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) |
|
14
api-doc/slot-machine/end-round/end-round-model.md
Normal file
14
api-doc/slot-machine/end-round/end-round-model.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Auto Spin Model
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
* EndRoundModel is a model class for the spin feature in the slot game. It extends the base model class and is intended to handle the visual representation and UI logic for spins.
|
||||||
|
|
||||||
|
## Description:
|
||||||
|
* Initializes a new instance of EndRoundModel.
|
||||||
|
* Calls the base model constructor.
|
||||||
|
* [p4f-game-core/src/view/end-round-model.js:#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5)
|
14
api-doc/slot-machine/end-round/end-round-view.md
Normal file
14
api-doc/slot-machine/end-round/end-round-view.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# Auto Spin view
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
* EndRoundView 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 EndRoundView.
|
||||||
|
* Calls the base View constructor.
|
||||||
|
* [p4f-game-core/src/view/end-round-view.js:#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5)
|
18
api-doc/slot-machine/spin/_category_.json
Normal file
18
api-doc/slot-machine/spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"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"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
134
api-doc/slot-machine/spin/spin-controller.md
Normal file
134
api-doc/slot-machine/spin/spin-controller.md
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
---
|
||||||
|
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)|
|
||||||
|
|
114
api-doc/slot-machine/spin/spin-model.md
Normal file
114
api-doc/slot-machine/spin/spin-model.md
Normal file
@ -0,0 +1,114 @@
|
|||||||
|
---
|
||||||
|
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>
|
15
api-doc/slot-machine/spin/spin-view.md
Normal file
15
api-doc/slot-machine/spin/spin-view.md
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
---
|
||||||
|
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)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user