---
sidebar_position: 3
---

# Bet Controller

## Index

### Properties
* [isHistoryActivated](#ishistoryactivated) `Boolean` Current played bet.
* [availablePoint](#availablepoint) `Number` Current played bet.
* [waiterAutoSpin](#waiterautospin) `Timer` Current played bet.
* [betProcessorFactory](#betprocessorfactory) `BetProcessorFactory` Current played bet.
* [betProcessor](#betprocessor) `BetProcessor` Current played bet.

### Methods

* [CalculateTotalBet](#calculatetotalbet) Register events to get data from server.
* [onChangeBetMode](#onchangebetmode) Start game when connected succesfully.
* [getClampedBet](#getclampedbet) Set resume data when connected server.
* [_start](#_start) Send request data to server.
* [_registerEvent](#_registerevent) Start game when connected succesfully with resume data.
* [_complete](#_complete) Start game when connected succesfully with resume data.
* [setBetPoints](#setbetpoints) Set resume data when connected server.
* [setBetPoint](#setbetpoint) Set resume data when connected server.
* [notifyBetDataChanged](#notifybetdatachanged) Set resume data when connected server.
* [onAutoSpinDeactivated](#onautospindeactivated) Set resume data when connected server.
* [onBetMultiplierReceived](#onbetmultiplierreceived) Set resume data when connected server.
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Set resume data when connected server.
* [onMiniGameDataReceived](#onminigamedatareceived) Set resume data when connected server.
* [onResumeOrReplayGameRound](#onresumeorreplaygameround) Set resume data when connected server.
* [onBalanceChanged](#onbalancechanged) Set resume data when connected server.
* [onReplayHistoryClient](#onreplayhistoryclient) Set resume data when connected server.
* [onResume](#onresume) Indicates the game current state is resuming.
* [onReplayHistory](#onreplayhistory) Indicates the game current state is resuming.
* [onHistoryActivated](#onhistoryactivated) Indicates the game current state is resuming.
* [onHistoryDeactivated](#onhistorydeactivated) Indicates the game current state is resuming.
* [onStartGame](#onstartgame) Show the client balance when the game is started.
* [onAutoSpinActivated](#onautospinactivated) Show the client balance when the game is started.
* [onSpinClicked](#onspinclicked) Show the client balance when the game is started.
* [onOutcomeSelected](#onoutcomeselected) Show the client balance when the game is started.
* [onBetPointChanged](#onbetpointchanged) Show the client balance when the game is started.
* [onBetMultiplierChanged](#onbetmultiplierchanged) Show the client balance when the game is started.
* [onPaylineCountChanged](#onpaylinecountchanged) Show the client balance when the game is started.
* [getTotalBetPoint](#gettotalbetpoint) Show the client balance when the game is started.
* [spin](#spin) Show the client balance when the game is started.
* [onManualBuyBonusOpened](#onmanualbuybonusopened) Show the client balance when the game is started.
* [onManualBuyBonusClosed](#onmanualbuybonusclosed) Show the client balance when the game is started.
* [onManualBuyBonusChanged](#onmanualbuybonuschanged) Show the client balance when the game is started.
* [setBetByPowerPlayModel](#setbetbypowerplaymodel) Show the client balance when the game is started.

## Details

#### isHistoryActivated
> Current played bet.<br/>

| 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
> Register events to get data from server.<br/>

| 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
> Send request data to server.<br/>

| 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
> Set resume data when connected server.<br/>

| 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
> Set resume data when connected server.<br/>

| 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
> Start game when connected succesfully.<br/>

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