123 lines
4.1 KiB
Markdown
123 lines
4.1 KiB
Markdown
---
|
|
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) |
|