114 lines
3.9 KiB
Markdown
114 lines
3.9 KiB
Markdown
---
|
|
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.
|
|
|
|
---
|
|
|
|
## Details
|
|
|
|
### Methods
|
|
|
|
#### registerEvent
|
|
|
|
Registers event listeners for free spin events.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L23) |
|
|
|
|
---
|
|
|
|
#### unregisterEvent
|
|
|
|
Unregisters event listeners.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L32) |
|
|
|
|
---
|
|
|
|
#### onNextScrollDataReceived
|
|
|
|
Processes scroll data and updates free game if not handled elsewhere.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L41) |
|
|
|
|
---
|
|
|
|
#### onPickupItemReceived
|
|
|
|
Handles item pickup and sets free game state accordingly.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L49](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L49) |
|
|
|
|
---
|
|
|
|
#### onEnterFreeSpin
|
|
|
|
Enters free spin mode and prepares for gameplay.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L57) |
|
|
|
|
---
|
|
|
|
#### onFreeSpinReady
|
|
|
|
Starts free spin after validation and delay.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L65) |
|
|
|
|
---
|
|
|
|
#### onStartFeatureGameClicked
|
|
|
|
Handles feature game start from user action.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L74) |
|
|
|
|
---
|
|
|
|
#### startFreeSpin
|
|
|
|
Initiates free spin logic and notifies spin.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/free-game-controller.js#L82](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/free-game-controller.js#L82) |
|
|
|
|
---
|
|
|
|
#### setFreeGameData
|
|
|
|
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) |
|
|
|