Compare commits
5 Commits
66aa119332
...
364fb3953c
Author | SHA1 | Date | |
---|---|---|---|
364fb3953c | |||
bc9b6054e5 | |||
9109548120 | |||
c8222d3f17 | |||
9224592ebc |
17
api-doc/controllers/_category_.json
Normal file
17
api-doc/controllers/_category_.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"position": 1,
|
||||||
|
"label": "Slot Game Machine",
|
||||||
|
"collapsible": true,
|
||||||
|
"collapsed": true,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index",
|
||||||
|
"title": "Slot Game Machine",
|
||||||
|
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
|
||||||
|
"keywords": [
|
||||||
|
"controller",
|
||||||
|
"project",
|
||||||
|
"repository",
|
||||||
|
"development environment"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
18
api-doc/controllers/auto-spin/_category_.json
Normal file
18
api-doc/controllers/auto-spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 4,
|
||||||
|
"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/controllers/auto-spin/auto-spin-controller.md
Normal file
352
api-doc/controllers/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/controllers/auto-spin/auto-spin-model.md
Normal file
307
api-doc/controllers/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/controllers/auto-spin/auto-spin-view.md
Normal file
15
api-doc/controllers/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:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/auto-spin-view.js#L5)
|
||||||
|
|
18
api-doc/controllers/balance/_category_.json
Normal file
18
api-doc/controllers/balance/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 2,
|
||||||
|
"label": "Balance",
|
||||||
|
"collapsible": true,
|
||||||
|
"collapsed": true,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index",
|
||||||
|
"title": "Balance",
|
||||||
|
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
|
||||||
|
"keywords": [
|
||||||
|
"controller",
|
||||||
|
"project",
|
||||||
|
"repository",
|
||||||
|
"model",
|
||||||
|
"balance"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
176
api-doc/controllers/balance/balance-controller.md
Normal file
176
api-doc/controllers/balance/balance-controller.md
Normal file
@ -0,0 +1,176 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Balance Controller
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
* [savedCurrentPoint](#savedcurrentpoint) `Number` Current played bet.
|
||||||
|
* [savedFreePoint](#savedfreepoint) `Number` Current free point played bet.
|
||||||
|
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming or not.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
* [onReplayHistoryClient](#onreplayhistoryclient) Indicates the game current state is resuming.
|
||||||
|
* [onResume](#onresume) Indicates the game current state is resuming.
|
||||||
|
* [onResumeEnd](#isresumeend) Indicates the game current state isn't resuming.
|
||||||
|
* [onDeposit](#ondeposit) Update the client balance when user deposit.
|
||||||
|
* [onConnected](#onconnected) Update the client balance when the game is connected.
|
||||||
|
* [onStartGame](#onstartgame) Show the client balance when the game is started.
|
||||||
|
* [onCollectDataReceived](#oncollectdatareceived)Update the client balance when the game is collected.
|
||||||
|
* [onBalanceDataReceived](#onbalancedatareceived) Update the client balance when get new balance data.
|
||||||
|
* [onBalanceChangeRateClicked](#onbalancechangerateclicked) Change the client balance rate.
|
||||||
|
* [updateBalance](#updatebalance) Update the client balance.
|
||||||
|
* [notifyBalance](#notifyblance) Notify the client balance.
|
||||||
|
* [placeBet](#placebet) Set current client bet.
|
||||||
|
* [clearBet](#clearbet) Clear current client bet<br/><br/>
|
||||||
|
* [onSpinStart](#onspinstart) Update the client balance when user spin.
|
||||||
|
* [onReplayHistory](#onreplayhistory) Indicates the game current state is resuming.
|
||||||
|
* [onReplayHistoryEnd](#onreplayhistoryend) Indicates the game current state isn't resuming.
|
||||||
|
* [onFastPlayDataReceived](#onfastokaydatareceived) Update the client balance when user playing Fast Play.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
#### savedCurrentPoint
|
||||||
|
> Current played bet.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L12)|
|
||||||
|
|
||||||
|
#### savedFreePoint
|
||||||
|
> Current free point played bet.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:13](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L13)|
|
||||||
|
|
||||||
|
#### isResume
|
||||||
|
> Indicates whether the game state is not resumed.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L14)|
|
||||||
|
|
||||||
|
#### onReplayHistoryClient
|
||||||
|
> Indicates the game current state is resuming.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:28](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L28)|
|
||||||
|
|
||||||
|
#### onResume
|
||||||
|
> Indicates the game current state is resuming.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L36)|
|
||||||
|
|
||||||
|
#### onResumeEnd
|
||||||
|
> Indicates the game current state isn't resuming.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L44)|
|
||||||
|
|
||||||
|
#### onDeposit
|
||||||
|
> Update the client balance when user deposit.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:52](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L52)|
|
||||||
|
|
||||||
|
#### onConnected
|
||||||
|
> Update the client balance when the game is connected.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:82](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L82)|
|
||||||
|
|
||||||
|
#### onStartGame
|
||||||
|
> Show the client balance when the game is started.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:90](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L90)|
|
||||||
|
|
||||||
|
#### onCollectDataReceived
|
||||||
|
> Update the client balance when the game is collected.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:99](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L99)|
|
||||||
|
|
||||||
|
#### onBalanceDataReceived
|
||||||
|
> Update the client balance when get new balance data.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:109](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L109)|
|
||||||
|
|
||||||
|
#### onBalanceChangeRateClicked
|
||||||
|
> Change the client balance rate.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:117](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L117)|
|
||||||
|
|
||||||
|
#### updateBalance
|
||||||
|
> Update the client balance.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L129)|
|
||||||
|
|
||||||
|
#### notifyBalance
|
||||||
|
> Notify the client balance.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:141](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L141)|
|
||||||
|
|
||||||
|
#### placeBet
|
||||||
|
> Set current client bet.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:151](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L151)|
|
||||||
|
|
||||||
|
#### clearBet
|
||||||
|
> Clear current client bet.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/controller/balance-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L180)|
|
||||||
|
|
||||||
|
#### onSpinStart
|
||||||
|
> Update the client balance when user spin.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L17)|
|
||||||
|
|
||||||
|
#### onReplayHistory
|
||||||
|
> Indicates the game current state is resuming.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L29)|
|
||||||
|
|
||||||
|
#### onReplayHistoryEnd
|
||||||
|
>Indicates the game current state isn't resuming.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L37)|
|
||||||
|
|
||||||
|
#### onFastPlayDataReceived
|
||||||
|
> Update the client balance.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L45)|
|
80
api-doc/controllers/balance/balance-model.md
Normal file
80
api-doc/controllers/balance/balance-model.md
Normal file
@ -0,0 +1,80 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Balance Model
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
* [currentPoint](#currentpoint) `Number` Current point.
|
||||||
|
* [freePoint](#freepoint) `Number` Current free point.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
* [SetCurrentPoint](#setcurrentpoint) Set current point.
|
||||||
|
* [GetCurrentPoint](#getcurrentpoint) Get current point.
|
||||||
|
* [SetFreePoint](#setfreepoint) Set current free point.
|
||||||
|
* [GetFreePoint](#getfreepoint) Get current free point.
|
||||||
|
* [GetAvailablePoint](#getavalablepoint) Get current point.
|
||||||
|
* [isNumber](#isnumber) Indicates whether the value is number or not.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
#### currentPoint
|
||||||
|
> Current point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:8](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
|
||||||
|
|
||||||
|
#### freePoint
|
||||||
|
> Current free point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:9](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
|
||||||
|
|
||||||
|
#### SetCurrentPoint
|
||||||
|
> Set current point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L14)|
|
||||||
|
|
||||||
|
#### GetCurrentPoint
|
||||||
|
> Get current point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:21](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L21)|
|
||||||
|
|
||||||
|
#### SetFreePoint
|
||||||
|
> Set Current free point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:27](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L27)|
|
||||||
|
|
||||||
|
#### GetFreePoint
|
||||||
|
> Get current free point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:34](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L34)|
|
||||||
|
|
||||||
|
#### GetAvailablePoint
|
||||||
|
> Get current point.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:40](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L40)|
|
||||||
|
|
||||||
|
#### isNumber
|
||||||
|
> Indicates whether the value is number or not.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
|
| Defined in | [p4f-game-core/src/model/balance-model.js:46](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L46)|
|
19
api-doc/controllers/balance/balance-view.md
Normal file
19
api-doc/controllers/balance/balance-view.md
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Balance View
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
* [BalanceChangeRate](#balancechangerate)
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
#### BalanceChangeRate
|
||||||
|
> ...
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-game-core/src/view/balance-view.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/view/balance-view.js#L11)|
|
63
api-doc/controllers/initialize-controller.md
Normal file
63
api-doc/controllers/initialize-controller.md
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Initialize Controller
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
* [resumeData ](#resumedata) `Object` Current played bet.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
* [_registerEvent](#_registerevent) Register events to get data from server.
|
||||||
|
* [_start](#_start) Send request data to server.
|
||||||
|
* [onConnected](#onconnected) Set resume data when connected server.
|
||||||
|
* [onStartGame](#onstartgame) Start game when connected succesfully.
|
||||||
|
* [startResumeGame](#startresumegame) Start game when connected succesfully with resume data.
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
#### resumeData
|
||||||
|
> Current played bet.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L12)|
|
||||||
|
|
||||||
|
#### _registerEvent
|
||||||
|
> Register events to get data from server.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L17)|
|
||||||
|
|
||||||
|
#### _start
|
||||||
|
> Send request data to server.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L24)|
|
||||||
|
|
||||||
|
#### onConnected
|
||||||
|
> Set resume data when connected server.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L32)|
|
||||||
|
|
||||||
|
#### onStartGame
|
||||||
|
> Start game when connected succesfully.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L38)|
|
||||||
|
|
||||||
|
#### startResumeGame
|
||||||
|
> Start game when connected succesfully with resume data.<br/>
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L50)|
|
18
api-doc/controllers/spin/_category_.json
Normal file
18
api-doc/controllers/spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 3,
|
||||||
|
"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/controllers/spin/spin-controller.md
Normal file
134
api-doc/controllers/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/controllers/spin/spin-model.md
Normal file
114
api-doc/controllers/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/controllers/spin/spin-view.md
Normal file
15
api-doc/controllers/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)
|
||||||
|
|
@ -5,4 +5,8 @@ sidebar_position: 0
|
|||||||
|
|
||||||
# Slot game API
|
# Slot game API
|
||||||
|
|
||||||
|
## Slot Machine
|
||||||
|
# Slot Game API
|
||||||
|
## Slot Game Machine
|
||||||
|
* [Balance Controller](controllers/balance-controller)
|
||||||
To be written
|
To be written
|
@ -5,6 +5,13 @@ title: CORE
|
|||||||
|
|
||||||
# Change history
|
# Change history
|
||||||
---
|
---
|
||||||
|
## 10/07/2025
|
||||||
|
- No fake jackpot win when enable TURBO
|
||||||
|
- Change behaviour jackpot win when enable TURBO
|
||||||
|
- Related submodules and core :
|
||||||
|
+ base-slot-template
|
||||||
|
+ p4f-slotty-core
|
||||||
|
+ workspace-p4f-slotty-core: tag version-pack_1_00
|
||||||
## 12/06/2025
|
## 12/06/2025
|
||||||
- Change the calculation method for the fake jackpot winning rate.
|
- Change the calculation method for the fake jackpot winning rate.
|
||||||
- Add logic handle win limit of game hyper
|
- Add logic handle win limit of game hyper
|
||||||
|
@ -5,6 +5,11 @@ title: Template
|
|||||||
---
|
---
|
||||||
# Change history
|
# Change history
|
||||||
---
|
---
|
||||||
|
## 10/07/2025
|
||||||
|
- [HYPER-CORE] Add button CONTINUE to fast-play when trigger nothing
|
||||||
|
+ Use fast-play function, trigger nothing at the end
|
||||||
|
+ Add the button CONTINUE
|
||||||
|
|
||||||
## 02/07/2025
|
## 02/07/2025
|
||||||
- [HYPER-CORE] Add feature **ON REEL PRESENT ALL WIN POINT** for non-cascade games.
|
- [HYPER-CORE] Add feature **ON REEL PRESENT ALL WIN POINT** for non-cascade games.
|
||||||
🔗[More Info](/docs/setup-main-game/main-scene/on-reel-win-point)
|
🔗[More Info](/docs/setup-main-game/main-scene/on-reel-win-point)
|
Loading…
x
Reference in New Issue
Block a user