131 lines
5.9 KiB
Markdown

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