70 lines
2.4 KiB
Markdown
70 lines
2.4 KiB
Markdown
---
|
|
sidebar_position: 1
|
|
---
|
|
|
|
# End Round Controller
|
|
|
|
## Index
|
|
|
|
### Methods
|
|
|
|
* [_registerEvent](#_registerevent) Registers the required network event listeners.
|
|
* [_unregisterEvent](#_unregisterevent) Unregisters previously attached network event listeners.
|
|
* [_start](#_start) Starts the controller logic to wait for round end and trigger collect.
|
|
* [onCollectDataReceived](#oncollectdatareceived) Handles data received from network when collect is ready.
|
|
* [autoTransitionNextState](#autotransitionnextstate) Moves the game to next state or round-over depending on result.
|
|
|
|
---
|
|
|
|
## Details
|
|
|
|
### Methods
|
|
|
|
#### _registerEvent
|
|
|
|
Registers the required network event listeners.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L15) |
|
|
|
|
---
|
|
|
|
#### _unregisterEvent
|
|
|
|
Unregisters previously attached network event listeners.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L21) |
|
|
|
|
---
|
|
|
|
#### _start
|
|
|
|
Starts the controller logic to wait for round end and trigger collect.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L27](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L27) |
|
|
|
|
---
|
|
|
|
#### onCollectDataReceived
|
|
|
|
Handles data received from network when collect is ready. Triggers automatic state transition.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L37) |
|
|
|
|
---
|
|
|
|
#### autoTransitionNextState
|
|
|
|
Moves the game to next state or round-over depending on result.
|
|
|
|
| meta | description |
|
|
| :--- | :---------- |
|
|
| Defined in | [p4f-slotty-core/src/controller/end-round-controller.js#L42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/end-round-controller.js#L42) |
|