--- sidebar_position: 1 --- # Bet Controller ## Index ### Properties * [isHistoryActivated](#ishistoryactivated) `Boolean` Indicates whether the game current state is resuming. * [availablePoint](#availablepoint) `Number` User's current point. * [waiterAutoSpin](#waiterautospin) `Timer` Base class actions that do have a finite time duration. * [betProcessorFactory](#betprocessorfactory) `BetProcessorFactory` Bet Processor Factory. * [betProcessor](#betprocessor) `BetProcessor` Current bet processor. ### Methods * [CalculateTotalBet](#calculatetotalbet) Current total bet. * [onChangeBetMode](#onchangebetmode) Change bet mode. * [getClampedBet](#getclampedbet) The maximum bet that can be placed. * [_start](#_start) Initialize some logic which need to be called the game enters the Bet State. * [_registerEvent](#_registerevent) Register events. * [_complete](#_complete) Called when the game exits the Bet State. * [setBetPoints](#setbetpoints) Set the bet points. * [setBetPoint](#setbetpoint) Set the bet point. * [notifyBetDataChanged](#notifybetdatachanged) Notify the bet data is changed. * [onAutoSpinDeactivated](#onautospindeactivated) Progress the bet data when the user stop auto spin. * [onBetArrayReceived](#onbetarrayreceived) Progress the bet data get the bet array data. * [onBetMultiplierReceived](#onbetmultiplierreceived) Progress the bet data when get the bet multiplier data. * [onFreeroundsStarted](#onfreeroundsstarted) Progress the bet data when the free rounds start. * [onFreeroundsDataReceived](#onfreeroundsdatareceived) Progress the bet data when get the free rounds data. * [onMiniGameDataReceived](#onminigamedatareceived) Progress the bet data when get the mini game data. * [onResumeOrReplayGameRound](#onresumeorreplaygameround) Progress the bet data when resume the game. * [onBalanceChanged](#onbalancechanged) Progress the bet data when the balance change. * [onReplayHistoryClient](#onreplayhistoryclient) Progress the bet data when replay the game. * [onResume](#onresume) Progress the bet data when resume the game. * [onReplayHistory](#onreplayhistory) Progress the bet data when replay the game. * [onHistoryActivated](#onhistoryactivated) Progress the bet data when replay the game. * [onHistoryDeactivated](#onhistorydeactivated) Progress the bet data when replay the game. * [onStartGame](#onstartgame) Process the bet data when the game is started. * [onAutoSpinActivated](#onautospinactivated) Change the current game state to the Spin State. * [onSpinClicked](#onspinclicked) Change the current game state to the Spin State. * [onOutcomeSelected](#onoutcomeselected) Set the outcome data. * [onBetPointChanged](#onbetpointchanged) Progress the bet point. * [onBetMultiplierChanged](#onbetmultiplierchanged) Process the bet multiplier. * [onPaylineCountChanged](#onpaylinecountchanged) Process the bet data when the pay line is changed. * [getTotalBetPoint](#gettotalbetpoint) Get total bet point. * [spin](#spin) Process bet data and notify event Spin. * [onManualBuyBonusOpened](#onmanualbuybonusopened) Process the bet data when the user buy bonus. * [onManualBuyBonusClosed](#onmanualbuybonusclosed) Process the bet data when the user buy bonus. * [onManualBuyBonusChanged](#onmanualbuybonuschanged) Process the bet data when the user buy bonus. * [setBetByPowerPlayModel](#setbetbypowerplaymodel) Process the bet data when the user buy bonus. ## Details #### isHistoryActivated > Indicates whether the game current state is resuming.
| meta | description | | :--- | :---------- | | Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L35)| #### availablePoint > User's current point.
| meta | description | | :--- | :---------- | | Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L36)| #### waiterAutoSpin > Base class actions that do have a finite time duration.
| meta | description | | :--- | :---------- | | Type | [Timer](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/helper/timer.js#L4) | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L37)| #### betProcessorFactory > Bet Processor Factory.
| meta | description | | :--- | :---------- | | Type | [BetProcessorFactory](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L8) | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L38)| #### betProcessor > Current bet processor.
| meta | description | | :--- | :---------- | | Type | [BetProcessor](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L30) | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:39](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L39)| #### CalculateTotalBet > Current total bet.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L44)| #### onChangeBetMode > Change bet mode.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L54)| #### getClampedBet > The maximum bet that can be placed.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:64](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L64)| #### _start > Initialize some logic which need to be called the game enters the Bet State.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L77)| #### _registerevent > Register events.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:112](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L112)| #### _complete > Called when the game exits the Bet State.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L129)| #### setBetPoints > Set the bet points.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:139](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L139)| #### setBetPoint > Set the bet point.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:149](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L149)| #### notifyBetDataChanged > Notify the bet data is changed.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:156](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L156)| #### onAutoSpinDeactivated > Process the bet data when the user stop auto spin.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L180)| #### onBetArrayReceived > Progress the bet data when get the bet array data.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:197](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L197)| #### onBetMultiplierReceived > Progress the bet data when get the bet multiplier data.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:209](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L209)| #### onFreeroundsStarted > Progress the bet data when the free rounds start.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:216](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L216)| #### onFreeroundsDataReceived > Progress the bet data when get the free rounds data.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:223](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#223)| #### onMiniGameDataReceived > Progress the bet data when get the mini game data.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:234](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L234)| #### onResumeOrReplayGameRound > Progress the bet data when resume the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:245](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L245)| #### onBalanceChanged > Progress the bet data when the balance change.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:254](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L254)| #### onReplayHistoryClient > Progress the bet data when replay the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:263](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L263)| #### onResume > Progress the bet data when resume the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:269](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L269)| #### onReplayHistory > Progress the bet data when replay the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:275](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L275)| #### onHistoryActivated > Progress the bet data when replay the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:281](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L281)| #### onHistoryDeactivated > Progress the bet data when replay the game.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:287](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L287)| #### onAutoSpinActivated > Change the current game state to the Spin State.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:309](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L309)| #### onSpinClicked > Change the current game state to the Spin State.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:153](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L315)| #### onOutcomeSelected > Set the outcome data.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:321](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L321)| #### onBetPointChanged > Progress the bet point.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:327](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L327)| #### onBetMultiplierChanged > Process the bet multiplier.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:333](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L333)| #### onPaylineCountChanged > Process the bet data when the pay line is changed.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:341](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L341)| #### getTotalBetPoint > Get the total bet point.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:349](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L349)| #### spin > Process bet data and notify event Spin.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:360](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L360)| #### onManualBuyBonusOpened > Process the bet data when the user buy bonus.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:375](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L375)| #### onManualBuyBonusClosed > Process the bet data when the user buy bonus.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:381](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L381)| #### onManualBuyBonusChanged > Process the bet data when the user buy bonus.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:386](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L386)| #### setBetByPowerPlayModel > Process the bet data when the user buy bonus.
| meta | description | | :--- | :---------- | | Defined in | [p4f-slotty-core/src/controller/bet-controller.js:391](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L391)|