add doc bonus game and format doc
This commit is contained in:
parent
2747ce88d7
commit
67ea5010bd
@ -8,34 +8,34 @@ sidebar_position: 1
|
|||||||
|
|
||||||
### Properties
|
### Properties
|
||||||
|
|
||||||
- [totalBet](#totalbet) `Number` Total current bet in a spin round.
|
* [totalBet](#totalbet) `Number` Total current bet in a spin round.
|
||||||
- [totalWin](#totalwin) `Number` Total win points collected.
|
* [totalWin](#totalwin) `Number` Total win points collected.
|
||||||
- [betLossAccumulation](#betlossaccumulation) `Number` Accumulated loss for checking loss limit condition.
|
* [betLossAccumulation](#betlossaccumulation) `Number` Accumulated loss for checking loss limit condition.
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [onSpinStarted](#onspinstarted) Decrements remaining auto spins and disables auto spin if none are left.
|
* [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.
|
* [onRoundEnd](#onroundend) Triggers win/loss limit checks at end of round.
|
||||||
- [onTake](#ontake) Triggers win/loss limit checks when a take action occurs.
|
* [onTake](#ontake) Triggers win/loss limit checks when a take action occurs.
|
||||||
- [onFreeroundsTriggered](#onfreeroundstriggered) Stops auto spin if freerounds are triggered.
|
* [onFreeroundsTriggered](#onfreeroundstriggered) Stops auto spin if freerounds are triggered.
|
||||||
- [onPresentFreeroundsWinStarted](#onpresentfreeroundswinstarted) Stops auto spin on freeround win presentation.
|
* [onPresentFreeroundsWinStarted](#onpresentfreeroundswinstarted) Stops auto spin on freeround win presentation.
|
||||||
- [onMiniGameStarted](#onminigamestarted) Stops auto spin if a mini-game starts.
|
* [onMiniGameStarted](#onminigamestarted) Stops auto spin if a mini-game starts.
|
||||||
- [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
|
* [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
|
||||||
- [onAutoSpinActivated](#onautospinactivated) Activates auto spin mode.
|
* [onAutoSpinActivated](#onautospinactivated) Activates auto spin mode.
|
||||||
- [onAutoSpinDeactivated](#onautospindeactivated) Disables auto spin and resets `betLossAccumulation`.
|
* [onAutoSpinDeactivated](#onautospindeactivated) Disables auto spin and resets `betLossAccumulation`.
|
||||||
- [onAutoSpinQuantityChanged](#onautospinquantitychanged) Updates number of auto spins remaining.
|
* [onAutoSpinQuantityChanged](#onautospinquantitychanged) Updates number of auto spins remaining.
|
||||||
- [onFeatureTrigger](#onfeaturetrigger) Stops auto spin if feature is triggered and `stopOnFeatureTrigger` is enabled.
|
* [onFeatureTrigger](#onfeaturetrigger) Stops auto spin if feature is triggered and `stopOnFeatureTrigger` is enabled.
|
||||||
- [onStopOnTriggerFeatureToggled](#onstopontriggerfeaturetoggled) Toggles stop-on-feature behavior.
|
* [onStopOnTriggerFeatureToggled](#onstopontriggerfeaturetoggled) Toggles stop-on-feature behavior.
|
||||||
- [onLossLimitToggled](#onlosslimittoggled) Enables/disables auto-spin stop based on loss limit.
|
* [onLossLimitToggled](#onlosslimittoggled) Enables/disables auto-spin stop based on loss limit.
|
||||||
- [onLossLimitValueChanged](#onlosslimitvaluechanged) Updates configured loss limit value.
|
* [onLossLimitValueChanged](#onlosslimitvaluechanged) Updates configured loss limit value.
|
||||||
- [onWinLimitToggled](#onwinlimittoggled) Enables or disables win limit mode.
|
* [onWinLimitToggled](#onwinlimittoggled) Enables or disables win limit mode.
|
||||||
- [onWinLimitValueChanged](#onwinlimitvaluechanged) Updates win limit threshold.
|
* [onWinLimitValueChanged](#onwinlimitvaluechanged) Updates win limit threshold.
|
||||||
- [onLobbyForcePauseGame](#onlobbyforcepausegame) Immediately stops auto spin when lobby forces pause.
|
* [onLobbyForcePauseGame](#onlobbyforcepausegame) Immediately stops auto spin when lobby forces pause.
|
||||||
- [onLobbyAllowResumeGame](#onlobbyallowresumegame) No action defined.
|
* [onLobbyAllowResumeGame](#onlobbyallowresumegame) No action defined.
|
||||||
- [onDisconnected](#ondisconnected) Stops auto spin due to network disconnect.
|
* [onDisconnected](#ondisconnected) Stops auto spin due to network disconnect.
|
||||||
- [onError](#onerror) Stops auto spin when error occurs.
|
* [onError](#onerror) Stops auto spin when error occurs.
|
||||||
- [onErrorAllowContinue](#onerrorallowcontinue) Stops auto spin when recoverable error is received.
|
* [onErrorAllowContinue](#onerrorallowcontinue) Stops auto spin when recoverable error is received.
|
||||||
- [stopAutoSpin](#stopautospin) Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
|
* [stopAutoSpin](#stopautospin) Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -52,7 +52,6 @@ sidebar_position: 1
|
|||||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
| 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)|
|
| 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
|
#### totalWin
|
||||||
@ -93,6 +92,7 @@ Decrements remaining auto spins and disables auto spin if none are left.
|
|||||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
* `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).
|
* `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -161,6 +161,7 @@ Updates internal bet tracking based on input data.
|
|||||||
* `betData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
* `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).
|
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||||
|
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -177,7 +178,7 @@ Activates auto spin mode.
|
|||||||
|
|
||||||
#### onAutoSpinDeactivated
|
#### onAutoSpinDeactivated
|
||||||
|
|
||||||
Disables auto spin and resets `betLossAccumulation`.
|
Disables auto spin and resets `betLossAccumulation` .
|
||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
@ -204,8 +205,8 @@ Updates number of auto spins remaining.
|
|||||||
#### onFeatureTrigger
|
#### onFeatureTrigger
|
||||||
|
|
||||||
Stops auto spin if:
|
Stops auto spin if:
|
||||||
- A free spin is triggered.
|
* A free spin is triggered.
|
||||||
- The `stopOnFeatureTrigger` option in the UI is enabled in the model.
|
* The `stopOnFeatureTrigger` option in the UI is enabled in the model.
|
||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
|
@ -45,7 +45,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Number |
|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L9)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -56,7 +56,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Boolean |
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L10)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -67,7 +67,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Boolean |
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L11)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -78,7 +78,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Number |
|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L12)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -89,7 +89,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Boolean |
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L13)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -100,7 +100,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Number |
|
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L14)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -111,7 +111,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Type | Boolean |
|
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L15)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -140,7 +140,7 @@ Gets remaining number of auto spins
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Returns | Number |
|
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L26)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
@ -167,7 +167,7 @@ Returns the current auto spin status.
|
|||||||
|
|
||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Returns | Boolean |
|
| Returns | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L38)|
|
| 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)|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
18
api-doc/slot-machine/bonus-game/_category_.json
Normal file
18
api-doc/slot-machine/bonus-game/_category_.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"position": 16,
|
||||||
|
"label": "Bonus Game",
|
||||||
|
"collapsible": true,
|
||||||
|
"collapsed": true,
|
||||||
|
"link": {
|
||||||
|
"type": "generated-index",
|
||||||
|
"title": "Bonus Game",
|
||||||
|
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
|
||||||
|
"keywords": [
|
||||||
|
"controller",
|
||||||
|
"project",
|
||||||
|
"repository",
|
||||||
|
"model",
|
||||||
|
"bonus game"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
122
api-doc/slot-machine/bonus-game/bonus-game-controller.md
Normal file
122
api-doc/slot-machine/bonus-game/bonus-game-controller.md
Normal file
@ -0,0 +1,122 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 1
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bonus Game Controller
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
* [registerEvent](#registerevent) Registers bonus game related events.
|
||||||
|
* [unregisterEvent](#unregisterevent) Unregisters bonus game related events.
|
||||||
|
* [onEnterBonus](#onenterbonus) Handles entry into the bonus game.
|
||||||
|
* [onBonusReady](#onbonusready) Called when bonus game is ready to start.
|
||||||
|
* [onBonusDataReceived](#onbonusdatareceived) Handles data received from the server for bonus game.
|
||||||
|
* [setStartBonusData](#setstartbonusdata) Initializes model with starting bonus data.
|
||||||
|
* [startBonusGame](#startbonusgame) Starts the bonus game.
|
||||||
|
* [endBonusGame](#endbonusgame) Ends the bonus game and notifies results.
|
||||||
|
* [requestBonus](#requestbonus) Sends the bonus selection to the game controller.
|
||||||
|
* [setBonusData](#setbonusdata) Sets bonus data in the model.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
### registerEvent
|
||||||
|
|
||||||
|
Registers bonus game related events
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L17) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### unregisterEvent
|
||||||
|
|
||||||
|
Unregisters bonus game related events.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L26) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### onEnterBonus
|
||||||
|
|
||||||
|
Handles entry into the bonus game.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L35) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### onBonusReady
|
||||||
|
|
||||||
|
Called when bonus game is ready to start.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L43](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L43) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### onBonusDataReceived
|
||||||
|
|
||||||
|
Handles data received from the server for bonus
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L51](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L51) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### setStartBonusData
|
||||||
|
|
||||||
|
Initializes model with starting bonus data.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L59) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### startBonusGame
|
||||||
|
|
||||||
|
Starts the bonus game.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L73](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L73) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### endBonusGame
|
||||||
|
|
||||||
|
Ends the bonus game and notifies results.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L79](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L79) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### requestBonus
|
||||||
|
|
||||||
|
Sends the bonus selection to the game controller.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L90](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L90) |
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### setBonusData
|
||||||
|
|
||||||
|
Sets bonus data in the model.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/controller/bonus-game-controller.js#L99](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/bonus-game-controller.js#L99) |
|
235
api-doc/slot-machine/bonus-game/bonus-game-model.md
Normal file
235
api-doc/slot-machine/bonus-game/bonus-game-model.md
Normal file
@ -0,0 +1,235 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 2
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bonus Game Model
|
||||||
|
|
||||||
|
## Index
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
* [random](#random) `Object` Stores RNG outcome data.
|
||||||
|
* [bonusData](#bonusdata) `Object` Stores bonus game result details.
|
||||||
|
* [currentSelectionItem](#currentselectionitem) `Number` Index of current selected item.
|
||||||
|
* [lifePoint](#lifepoint) `Number` Remaining life in the bonus game.
|
||||||
|
* [type](#type) `Number` Type of bonus game.
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
* [SetRandom](#setrandom) Sets the random number.
|
||||||
|
* [GetRandom](#getrandom) Returns the stored random data.
|
||||||
|
* [SetLifePoint](#setlifepoint) Sets the number of remaining life points.
|
||||||
|
* [GetLifePoint](#getlifepoint) Returns the current life points.
|
||||||
|
* [SetType](#settype) Sets the bonus game type.
|
||||||
|
* [GetType](#gettype) Returns the current type.
|
||||||
|
* [SetCurrentSelectionItem](#setcurrentselectionitem) Sets the index of the selected item.
|
||||||
|
* [GetCurrentSelectionItem](#getcurrentselectionitem) Returns the selected item index.
|
||||||
|
* [SetBonusData](#setbonusdata) Sets the bonus data object.
|
||||||
|
* [GetBonusData](#getbonusdata) Gets the full bonus data object.
|
||||||
|
* [GetTotalWinPoint](#gettotalwinpoint) Returns total win points from bonus data.
|
||||||
|
* [CheckBonusEnd](#checkbonusend) Checks if bonus game has ended.
|
||||||
|
* [GetResultData](#getresultdata) Returns the current turn result data.
|
||||||
|
* [GetBonusTurnItem](#getbonusturnitem) Returns the selected item for current bonus turn.
|
||||||
|
* [GetBonusTurnWinPoint](#getbonusturnwinpoint) Returns the win point of current bonus turn.
|
||||||
|
* [GetBonusTurnLifePoint](#getbonusturnlifepoint) Returns the life point remaining for current bonus turn.
|
||||||
|
* [GetBonusTurnPayout](#getbonusturnpayout) Returns the payout of the current bonus turn.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
## Details
|
||||||
|
|
||||||
|
### Properties
|
||||||
|
|
||||||
|
#### random
|
||||||
|
|
||||||
|
> Stores RNG outcome data.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L9) |
|
||||||
|
|
||||||
|
#### bonusData
|
||||||
|
|
||||||
|
> Stores bonus game result details.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L10) |
|
||||||
|
|
||||||
|
#### currentSelectionItem
|
||||||
|
|
||||||
|
> Index of current selected item.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L11) |
|
||||||
|
|
||||||
|
### Methods
|
||||||
|
|
||||||
|
#### SetRandom
|
||||||
|
|
||||||
|
Sets the random number.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L18) |
|
||||||
|
|
||||||
|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||||
|
|
||||||
|
**Parameters**
|
||||||
|
* `random` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
#### GetRandom
|
||||||
|
|
||||||
|
Returns the stored random data.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L24) |
|
||||||
|
|
||||||
|
#### SetLifePoint
|
||||||
|
|
||||||
|
Sets the number of remaining life points.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L30) |
|
||||||
|
|
||||||
|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||||
|
|
||||||
|
**Parameters**
|
||||||
|
* `lifePoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
#### GetLifePoint
|
||||||
|
|
||||||
|
Returns the current life points.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L36) |
|
||||||
|
|
||||||
|
#### SetType
|
||||||
|
|
||||||
|
Sets the bonus game type.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L42) |
|
||||||
|
|
||||||
|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||||
|
|
||||||
|
**Parameters**
|
||||||
|
* `type` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
#### GetType
|
||||||
|
|
||||||
|
Returns the current type.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Returns | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L48](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L48) |
|
||||||
|
|
||||||
|
#### SetCurrentSelectionItem
|
||||||
|
|
||||||
|
Sets the index of the selected item.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L54) |
|
||||||
|
|
||||||
|
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||||
|
|
||||||
|
**Parameters**
|
||||||
|
* `selectionIndex` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||||
|
|
||||||
|
</p>
|
||||||
|
|
||||||
|
#### GetCurrentSelectionItem
|
||||||
|
|
||||||
|
Returns the selected item index.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L60](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L60) |
|
||||||
|
|
||||||
|
#### SetBonusData
|
||||||
|
|
||||||
|
Sets the bonus data object.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L66](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L66) |
|
||||||
|
|
||||||
|
#### GetBonusData
|
||||||
|
|
||||||
|
Gets the full bonus data object.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L72](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L72) |
|
||||||
|
|
||||||
|
#### GetTotalWinPoint
|
||||||
|
|
||||||
|
Returns total win points from bonus data.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L78](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L78) |
|
||||||
|
|
||||||
|
#### CheckBonusEnd
|
||||||
|
|
||||||
|
Checks if bonus game has ended.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L84](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L84) |
|
||||||
|
|
||||||
|
#### GetResultData
|
||||||
|
|
||||||
|
Returns the current turn result data.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L90](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L90) |
|
||||||
|
|
||||||
|
#### GetBonusTurnItem
|
||||||
|
|
||||||
|
Returns the selected item for current bonus turn.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L96](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L96) |
|
||||||
|
|
||||||
|
#### GetBonusTurnWinPoint
|
||||||
|
|
||||||
|
Returns the win point of current bonus turn.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L102](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L102) |
|
||||||
|
|
||||||
|
#### GetBonusTurnLifePoint
|
||||||
|
|
||||||
|
Returns the life point remaining for current bonus turn.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L111](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L111) |
|
||||||
|
|
||||||
|
#### GetBonusTurnPayout
|
||||||
|
|
||||||
|
Returns the payout of the current bonus turn.
|
||||||
|
|
||||||
|
| meta | description |
|
||||||
|
| :--- | :---------- |
|
||||||
|
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L114](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L114) |
|
14
api-doc/slot-machine/bonus-game/bonus-game-view.md
Normal file
14
api-doc/slot-machine/bonus-game/bonus-game-view.md
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
---
|
||||||
|
sidebar_position: 3
|
||||||
|
---
|
||||||
|
|
||||||
|
# Bonus Game View
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Creates a new instance of the `BonusGameView`. It inherits functionality from the `View` class of `P4FCore`.
|
||||||
|
|
||||||
|
## Description:
|
||||||
|
* Initializes a new instance of BonusGameView.
|
||||||
|
* Calls the base View constructor.
|
||||||
|
* [p4f-slotty-core/src/view/bonus-game-view.js#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/bonus-game-view.js#L5)
|
@ -1,17 +1,18 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 1
|
sidebar_position: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
# End Round Controller
|
# End Round Controller
|
||||||
|
|
||||||
## Index
|
## Index
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [_registerEvent](#_registerevent) Registers the required network event listeners.
|
* [_registerEvent](#_registerevent) Registers the required network event listeners.
|
||||||
- [_unregisterEvent](#_unregisterevent) Unregisters previously attached 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.
|
* [_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.
|
* [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.
|
* [autoTransitionNextState](#autotransitionnextstate) Moves the game to next state or round-over depending on result.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ sidebar_position: 2
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
- Initializes a new instance of `EndRoundModel`.
|
* Initializes a new instance of `EndRoundModel`.
|
||||||
- Calls the base model constructor.
|
* Calls the base model constructor.
|
||||||
- Handles end-of-round events and updates the UI accordingly.
|
* Handles end-of-round events and updates the UI accordingly.
|
||||||
|
|
||||||
[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5)
|
[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5)
|
||||||
|
@ -10,6 +10,6 @@ EndRoundView is a UI component for managing the end-of-round visuals in the slot
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
- Constructs a new EndRoundView instance.
|
* Constructs a new EndRoundView instance.
|
||||||
- Invokes the base View constructor for initialization.
|
* Invokes the base View constructor for initialization.
|
||||||
- [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5)
|
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5)
|
||||||
|
@ -1,21 +1,22 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 1
|
sidebar_position: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
# Free Game Controller
|
# Free Game Controller
|
||||||
|
|
||||||
## Index
|
## Index
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [registerEvent](#registerevent) Registers event listeners for free spin events.
|
* [registerEvent](#registerevent) Registers event listeners for free spin events.
|
||||||
- [unregisterEvent](#unregisterevent) Unregisters event listeners.
|
* [unregisterEvent](#unregisterevent) Unregisters event listeners.
|
||||||
- [onNextScrollDataReceived](#onnextscrolldatareceived) Handles incoming scroll data from server.
|
* [onNextScrollDataReceived](#onnextscrolldatareceived) Handles incoming scroll data from server.
|
||||||
- [onPickupItemReceived](#onpickupitemreceived) Processes item pickups related to free spins.
|
* [onPickupItemReceived](#onpickupitemreceived) Processes item pickups related to free spins.
|
||||||
- [onEnterFreeSpin](#onenterfreespin) Enters free spin mode and prepares for gameplay.
|
* [onEnterFreeSpin](#onenterfreespin) Enters free spin mode and prepares for gameplay.
|
||||||
- [onFreeSpinReady](#onfreespinready) Starts free spin after validation and delay.
|
* [onFreeSpinReady](#onfreespinready) Starts free spin after validation and delay.
|
||||||
- [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles feature game start from user action.
|
* [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles feature game start from user action.
|
||||||
- [startFreeSpin](#startfreespin) Initiates free spin logic and notifies spin.
|
* [startFreeSpin](#startfreespin) Initiates free spin logic and notifies spin.
|
||||||
- [setFreeGameData](#setfreegamedata) Updates model with new free spin data.
|
* [setFreeGameData](#setfreegamedata) Updates model with new free spin data.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -110,4 +111,3 @@ Updates model with new free spin data.
|
|||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L95](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L95) |
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L95](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L95) |
|
||||||
|
|
||||||
|
@ -8,13 +8,13 @@ sidebar_position: 2
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins.
|
* [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins.
|
||||||
- [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins.
|
* [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins.
|
||||||
- [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play.
|
* [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play.
|
||||||
- [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins.
|
* [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins.
|
||||||
- [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already.
|
* [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already.
|
||||||
- [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session.
|
* [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session.
|
||||||
- [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins.
|
* [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -89,4 +89,3 @@ Gets the current boost/multiplier for free spins.
|
|||||||
| meta | description |
|
| meta | description |
|
||||||
| :--- | :---------- |
|
| :--- | :---------- |
|
||||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L46](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L46) |
|
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L46](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L46) |
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 3
|
sidebar_position: 3
|
||||||
---
|
---
|
||||||
|
|
||||||
# Free Game View
|
# Free Game View
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
@ -13,7 +14,7 @@ The `FreeGameView` class manages the presentation layer for the Free Game featur
|
|||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [presentFreeGame](#presentfreegame) — Displays the Free Game UI presentation.
|
* [presentFreeGame](#presentfreegame) — Displays the Free Game UI presentation.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -1,20 +1,21 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 1
|
sidebar_position: 1
|
||||||
---
|
---
|
||||||
|
|
||||||
# Take Or Gamble Controller
|
# Take Or Gamble Controller
|
||||||
|
|
||||||
## Index
|
## Index
|
||||||
|
|
||||||
### Methods
|
### Methods
|
||||||
|
|
||||||
- [_start](#_start) Initializes the take-or-gamble phase depending on game state.
|
* [_start](#_start) Initializes the take-or-gamble phase depending on game state.
|
||||||
- [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions.
|
* [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions.
|
||||||
- [onTakeClicked](#ontakeclicked) Handles take button click.
|
* [onTakeClicked](#ontakeclicked) Handles take button click.
|
||||||
- [onGambleClicked](#ongambleclicked) Handles gamble button click.
|
* [onGambleClicked](#ongambleclicked) Handles gamble button click.
|
||||||
- [take](#take) Triggers the 'take' action.
|
* [take](#take) Triggers the 'take' action.
|
||||||
- [gamble](#gamble) Triggers the 'gamble' action.
|
* [gamble](#gamble) Triggers the 'gamble' action.
|
||||||
- [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled.
|
* [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled.
|
||||||
- [_complete](#_complete) Placeholder for completion handling.
|
* [_complete](#_complete) Placeholder for completion handling.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ sidebar_position: 2
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
- Initializes a new instance of `Take Or Gamble Model`.
|
* Initializes a new instance of `Take Or Gamble Model`.
|
||||||
- Calls the base model constructor.
|
* Calls the base model constructor.
|
||||||
- Handles UI logic and state for the "Take or Gamble" feature.
|
* Handles UI logic and state for the "Take or Gamble" feature.
|
||||||
- [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5)
|
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5)
|
||||||
|
@ -10,7 +10,6 @@ sidebar_position: 3
|
|||||||
|
|
||||||
## Description
|
## Description
|
||||||
|
|
||||||
- Constructs a new `Take Or Gamble View` instance.
|
* Constructs a new `Take Or Gamble View` instance.
|
||||||
- Invokes the base `View` constructor.
|
* Invokes the base `View` constructor.
|
||||||
- Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5)
|
* Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user