add doc free game
This commit is contained in:
parent
31095d8661
commit
2747ce88d7
@ -1,5 +1,4 @@
|
||||
---
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
|
18
api-doc/slot-machine/free-game/_category_.json
Normal file
18
api-doc/slot-machine/free-game/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 28,
|
||||
"label": "Free Game",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Free Game",
|
||||
"description": "This section will guide you through the process of setting up a new project, including creating a new repository and configuring your development environment.",
|
||||
"keywords": [
|
||||
"controller",
|
||||
"project",
|
||||
"repository",
|
||||
"model",
|
||||
"free-game"
|
||||
]
|
||||
}
|
||||
}
|
113
api-doc/slot-machine/free-game/free-game-controller.md
Normal file
113
api-doc/slot-machine/free-game/free-game-controller.md
Normal file
@ -0,0 +1,113 @@
|
||||
---
|
||||
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) |
|
||||
|
92
api-doc/slot-machine/free-game/free-game-model.md
Normal file
92
api-doc/slot-machine/free-game/free-game-model.md
Normal file
@ -0,0 +1,92 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Free Game Model
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [SetTotalFreeSpin](#settotalfreespin) Sets the total number of free spins.
|
||||
- [GetTotalFreeSpin](#gettotalfreespin) Retrieves the total number of free spins.
|
||||
- [SetFreeSpinLeft](#setfreespinleft) Sets how many free spins are left to play.
|
||||
- [GetFreeSpinLeft](#getfreespinleft) Gets the number of remaining free spins.
|
||||
- [GetFreeSpinPlayed](#getfreespinplayed) Calculates the number of spins that have been played already.
|
||||
- [SetFreeSpinBoost](#setfreespinboost) Sets the boost/multiplier for the free spin session.
|
||||
- [GetFreeSpinBoost](#getfreespinboost) Gets the current boost/multiplier for free spins.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### SetTotalFreeSpin
|
||||
|
||||
Sets the total number of free spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L16) |
|
||||
|
||||
---
|
||||
|
||||
#### GetTotalFreeSpin
|
||||
|
||||
Retrieves the total number of free spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L22) |
|
||||
|
||||
---
|
||||
|
||||
#### SetFreeSpinLeft
|
||||
|
||||
Sets how many free spins are left to play.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L26) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFreeSpinLeft
|
||||
|
||||
Gets the number of remaining free spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L32) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFreeSpinPlayed
|
||||
|
||||
Calculates the number of spins that have been played already.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L36) |
|
||||
|
||||
---
|
||||
|
||||
#### SetFreeSpinBoost
|
||||
|
||||
Sets the boost/multiplier for the free spin session.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L40) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFreeSpinBoost
|
||||
|
||||
Gets the current boost/multiplier for free spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/free-game-model.js#L46](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/free-game-model.js#L46) |
|
||||
|
30
api-doc/slot-machine/free-game/free-game-view.md
Normal file
30
api-doc/slot-machine/free-game/free-game-view.md
Normal file
@ -0,0 +1,30 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
# Free Game View
|
||||
|
||||
## Overview
|
||||
|
||||
The `FreeGameView` class manages the presentation layer for the Free Game feature. It handles the UI transitions and animations when entering the Free Game mode during gameplay.
|
||||
|
||||
---
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [presentFreeGame](#presentfreegame) — Displays the Free Game UI presentation.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### presentFreeGame
|
||||
|
||||
Displays the Free Game screen to the player. This method is triggered when the player enters the Free Game feature. It typically includes animations or UI transitions indicating the start of Free Game mode.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/view/free-game-view.js#L6](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/free-game-view.js#L6) |
|
Loading…
x
Reference in New Issue
Block a user