diff --git a/api-doc/slot-machine/auto-spin/auto-spin-controller.md b/api-doc/slot-machine/auto-spin/auto-spin-controller.md index 1927fc1..628baee 100644 --- a/api-doc/slot-machine/auto-spin/auto-spin-controller.md +++ b/api-doc/slot-machine/auto-spin/auto-spin-controller.md @@ -8,34 +8,34 @@ sidebar_position: 1 ### 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. +* [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. +* [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. --- @@ -52,7 +52,6 @@ sidebar_position: 1 | 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 @@ -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) * `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean). +

--- @@ -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) * `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number). +

--- @@ -177,7 +178,7 @@ Activates auto spin mode. #### onAutoSpinDeactivated -Disables auto spin and resets `betLossAccumulation`. +Disables auto spin and resets `betLossAccumulation` . | meta | description | | :--- | :---------- | @@ -204,8 +205,8 @@ Updates number of auto spins remaining. #### onFeatureTrigger Stops auto spin if: -- A free spin is triggered. -- The `stopOnFeatureTrigger` option in the UI is enabled in the model. +* A free spin is triggered. +* The `stopOnFeatureTrigger` option in the UI is enabled in the model. | meta | description | | :--- | :---------- | diff --git a/api-doc/slot-machine/auto-spin/auto-spin-model.md b/api-doc/slot-machine/auto-spin/auto-spin-model.md index d9adc62..a6d9aac 100644 --- a/api-doc/slot-machine/auto-spin/auto-spin-model.md +++ b/api-doc/slot-machine/auto-spin/auto-spin-model.md @@ -45,7 +45,7 @@ sidebar_position: 2 | 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)| --- @@ -56,7 +56,7 @@ sidebar_position: 2 | 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)| --- @@ -67,7 +67,7 @@ sidebar_position: 2 | 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)| --- @@ -78,7 +78,7 @@ sidebar_position: 2 | 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)| --- @@ -89,7 +89,7 @@ sidebar_position: 2 | 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)| --- @@ -100,7 +100,7 @@ sidebar_position: 2 | 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)| --- @@ -111,7 +111,7 @@ sidebar_position: 2 | 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)| --- @@ -140,7 +140,7 @@ Gets remaining number of auto spins | 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)| --- @@ -167,7 +167,7 @@ Returns the current auto spin status. | 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)| --- diff --git a/api-doc/slot-machine/bonus-game/_category_.json b/api-doc/slot-machine/bonus-game/_category_.json new file mode 100644 index 0000000..f2ddcc5 --- /dev/null +++ b/api-doc/slot-machine/bonus-game/_category_.json @@ -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" + ] + } +} \ No newline at end of file diff --git a/api-doc/slot-machine/bonus-game/bonus-game-controller.md b/api-doc/slot-machine/bonus-game/bonus-game-controller.md new file mode 100644 index 0000000..f649cac --- /dev/null +++ b/api-doc/slot-machine/bonus-game/bonus-game-controller.md @@ -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) | diff --git a/api-doc/slot-machine/bonus-game/bonus-game-model.md b/api-doc/slot-machine/bonus-game/bonus-game-model.md new file mode 100644 index 0000000..403c4ed --- /dev/null +++ b/api-doc/slot-machine/bonus-game/bonus-game-model.md @@ -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) | + +

+ + **Parameters** + * `random` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) + +

+ +#### 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) | + +

+ + **Parameters** + * `lifePoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) + +

+ +#### 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) | + +

+ + **Parameters** + * `type` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) + +

+ +#### 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) | + +

+ + **Parameters** + * `selectionIndex` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) + +

+ +#### 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) | diff --git a/api-doc/slot-machine/bonus-game/bonus-game-view.md b/api-doc/slot-machine/bonus-game/bonus-game-view.md new file mode 100644 index 0000000..3ba4d4e --- /dev/null +++ b/api-doc/slot-machine/bonus-game/bonus-game-view.md @@ -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) diff --git a/api-doc/slot-machine/end-round/end-round-controller.md b/api-doc/slot-machine/end-round/end-round-controller.md index fa56f91..4bf8f9b 100644 --- a/api-doc/slot-machine/end-round/end-round-controller.md +++ b/api-doc/slot-machine/end-round/end-round-controller.md @@ -1,17 +1,18 @@ --- sidebar_position: 1 --- + # End Round Controller ## Index ### Methods -- [_registerEvent](#_registerevent) Registers the required network event listeners. -- [_unregisterEvent](#_unregisterevent) Unregisters previously attached network event listeners. -- [_start](#_start) Starts the controller logic to wait for round end and trigger collect. -- [onCollectDataReceived](#oncollectdatareceived) Handles data received from network when collect is ready. -- [autoTransitionNextState](#autotransitionnextstate) Moves the game to next state or round-over depending on result. +* [_registerEvent](#_registerevent) Registers the required network event listeners. +* [_unregisterEvent](#_unregisterevent) Unregisters previously attached network event listeners. +* [_start](#_start) Starts the controller logic to wait for round end and trigger collect. +* [onCollectDataReceived](#oncollectdatareceived) Handles data received from network when collect is ready. +* [autoTransitionNextState](#autotransitionnextstate) Moves the game to next state or round-over depending on result. --- diff --git a/api-doc/slot-machine/end-round/end-round-model.md b/api-doc/slot-machine/end-round/end-round-model.md index a310e87..3089a81 100644 --- a/api-doc/slot-machine/end-round/end-round-model.md +++ b/api-doc/slot-machine/end-round/end-round-model.md @@ -10,8 +10,8 @@ sidebar_position: 2 ## Description -- Initializes a new instance of `EndRoundModel`. -- Calls the base model constructor. -- Handles end-of-round events and updates the UI accordingly. +* Initializes a new instance of `EndRoundModel`. +* Calls the base model constructor. +* Handles end-of-round events and updates the UI accordingly. -[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5) \ No newline at end of file +[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5) diff --git a/api-doc/slot-machine/end-round/end-round-view.md b/api-doc/slot-machine/end-round/end-round-view.md index 94eedfd..edb3ea2 100644 --- a/api-doc/slot-machine/end-round/end-round-view.md +++ b/api-doc/slot-machine/end-round/end-round-view.md @@ -10,6 +10,6 @@ EndRoundView is a UI component for managing the end-of-round visuals in the slot ## Description -- Constructs a new EndRoundView instance. -- Invokes the base View constructor for initialization. -- [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5) +* Constructs a new EndRoundView instance. +* Invokes the base View constructor for initialization. +* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5) diff --git a/api-doc/slot-machine/free-game/free-game-controller.md b/api-doc/slot-machine/free-game/free-game-controller.md index ecfde38..24efc45 100644 --- a/api-doc/slot-machine/free-game/free-game-controller.md +++ b/api-doc/slot-machine/free-game/free-game-controller.md @@ -1,21 +1,22 @@ --- sidebar_position: 1 --- + # Free Game Controller ## Index ### Methods -- [registerEvent](#registerevent) Registers event listeners for free spin events. -- [unregisterEvent](#unregisterevent) Unregisters event listeners. -- [onNextScrollDataReceived](#onnextscrolldatareceived) Handles incoming scroll data from server. -- [onPickupItemReceived](#onpickupitemreceived) Processes item pickups related to free spins. -- [onEnterFreeSpin](#onenterfreespin) Enters free spin mode and prepares for gameplay. -- [onFreeSpinReady](#onfreespinready) Starts free spin after validation and delay. -- [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles feature game start from user action. -- [startFreeSpin](#startfreespin) Initiates free spin logic and notifies spin. -- [setFreeGameData](#setfreegamedata) Updates model with new free spin data. +* [registerEvent](#registerevent) Registers event listeners for free spin events. +* [unregisterEvent](#unregisterevent) Unregisters event listeners. +* [onNextScrollDataReceived](#onnextscrolldatareceived) Handles incoming scroll data from server. +* [onPickupItemReceived](#onpickupitemreceived) Processes item pickups related to free spins. +* [onEnterFreeSpin](#onenterfreespin) Enters free spin mode and prepares for gameplay. +* [onFreeSpinReady](#onfreespinready) Starts free spin after validation and delay. +* [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles feature game start from user action. +* [startFreeSpin](#startfreespin) Initiates free spin logic and notifies spin. +* [setFreeGameData](#setfreegamedata) Updates model with new free spin data. --- @@ -110,4 +111,3 @@ Updates model with new free spin data. | meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L95](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L95) | - diff --git a/api-doc/slot-machine/free-game/free-game-model.md b/api-doc/slot-machine/free-game/free-game-model.md index 1e51042..eaf8ef9 100644 --- a/api-doc/slot-machine/free-game/free-game-model.md +++ b/api-doc/slot-machine/free-game/free-game-model.md @@ -8,13 +8,13 @@ sidebar_position: 2 ### Methods -- [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins. -- [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins. -- [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play. -- [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins. -- [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already. -- [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session. -- [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins. +* [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins. +* [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins. +* [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play. +* [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins. +* [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already. +* [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session. +* [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins. --- @@ -89,4 +89,3 @@ Gets the current boost/multiplier for free spins. | meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/model/free-game-model.js#L46](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L46) | - diff --git a/api-doc/slot-machine/free-game/free-game-view.md b/api-doc/slot-machine/free-game/free-game-view.md index d0a7521..74a585b 100644 --- a/api-doc/slot-machine/free-game/free-game-view.md +++ b/api-doc/slot-machine/free-game/free-game-view.md @@ -1,6 +1,7 @@ --- sidebar_position: 3 --- + # Free Game View ## Overview @@ -13,7 +14,7 @@ The `FreeGameView` class manages the presentation layer for the Free Game featur ### Methods -- [presentFreeGame](#presentfreegame) — Displays the Free Game UI presentation. +* [presentFreeGame](#presentfreegame) — Displays the Free Game UI presentation. --- diff --git a/api-doc/slot-machine/take-and-gamble/take-and-gamble-controller.md b/api-doc/slot-machine/take-and-gamble/take-and-gamble-controller.md index 18a66c5..85b2946 100644 --- a/api-doc/slot-machine/take-and-gamble/take-and-gamble-controller.md +++ b/api-doc/slot-machine/take-and-gamble/take-and-gamble-controller.md @@ -1,20 +1,21 @@ --- sidebar_position: 1 --- + # Take Or Gamble Controller ## Index ### Methods -- [_start](#_start) Initializes the take-or-gamble phase depending on game state. -- [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions. -- [onTakeClicked](#ontakeclicked) Handles take button click. -- [onGambleClicked](#ongambleclicked) Handles gamble button click. -- [take](#take) Triggers the 'take' action. -- [gamble](#gamble) Triggers the 'gamble' action. -- [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled. -- [_complete](#_complete) Placeholder for completion handling. +* [_start](#_start) Initializes the take-or-gamble phase depending on game state. +* [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions. +* [onTakeClicked](#ontakeclicked) Handles take button click. +* [onGambleClicked](#ongambleclicked) Handles gamble button click. +* [take](#take) Triggers the 'take' action. +* [gamble](#gamble) Triggers the 'gamble' action. +* [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled. +* [_complete](#_complete) Placeholder for completion handling. --- diff --git a/api-doc/slot-machine/take-and-gamble/take-and-gamble-model.md b/api-doc/slot-machine/take-and-gamble/take-and-gamble-model.md index 965f147..6312da9 100644 --- a/api-doc/slot-machine/take-and-gamble/take-and-gamble-model.md +++ b/api-doc/slot-machine/take-and-gamble/take-and-gamble-model.md @@ -10,7 +10,7 @@ sidebar_position: 2 ## Description -- Initializes a new instance of `Take Or Gamble Model`. -- Calls the base model constructor. -- Handles UI logic and state for the "Take or Gamble" feature. -- [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5) \ No newline at end of file +* Initializes a new instance of `Take Or Gamble Model`. +* Calls the base model constructor. +* Handles UI logic and state for the "Take or Gamble" feature. +* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5) diff --git a/api-doc/slot-machine/take-and-gamble/take-and-gamble-view.md b/api-doc/slot-machine/take-and-gamble/take-and-gamble-view.md index 5c16eba..92ddfd5 100644 --- a/api-doc/slot-machine/take-and-gamble/take-and-gamble-view.md +++ b/api-doc/slot-machine/take-and-gamble/take-and-gamble-view.md @@ -10,7 +10,6 @@ sidebar_position: 3 ## Description -- Constructs a new `Take Or Gamble View` instance. -- Invokes the base `View` constructor. -- Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5) - +* Constructs a new `Take Or Gamble View` instance. +* Invokes the base `View` constructor. +* Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5)