Compare commits
1 Commits
acc0e73e40
...
9224592ebc
Author | SHA1 | Date | |
---|---|---|---|
9224592ebc |
17
api-doc/controllers/_category_.json
Normal file
17
api-doc/controllers/_category_.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"position": 1,
|
||||
"label": "Slot Game Machine",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Slot Game Machine",
|
||||
"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",
|
||||
"development environment"
|
||||
]
|
||||
}
|
||||
}
|
18
api-doc/controllers/balance/_category_.json
Normal file
18
api-doc/controllers/balance/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 2,
|
||||
"label": "Balance",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Balance",
|
||||
"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",
|
||||
"balance"
|
||||
]
|
||||
}
|
||||
}
|
176
api-doc/controllers/balance/balance-controller.md
Normal file
176
api-doc/controllers/balance/balance-controller.md
Normal file
@ -0,0 +1,176 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Balance Controller
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [savedCurrentPoint](#savedcurrentpoint) `Number` Current played bet.
|
||||
* [savedFreePoint](#savedfreepoint) `Number` Current free point played bet.
|
||||
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming or not.
|
||||
|
||||
### Methods
|
||||
|
||||
* [onReplayHistoryClient](#onreplayhistoryclient) Indicates the game current state is resuming.
|
||||
* [onResume](#onresume) Indicates the game current state is resuming.
|
||||
* [onResumeEnd](#isresumeend) Indicates the game current state isn't resuming.
|
||||
* [onDeposit](#ondeposit) Update the client balance when user deposit.
|
||||
* [onConnected](#onconnected) Update the client balance when the game is connected.
|
||||
* [onStartGame](#onstartgame) Show the client balance when the game is started.
|
||||
* [onCollectDataReceived](#oncollectdatareceived)Update the client balance when the game is collected.
|
||||
* [onBalanceDataReceived](#onbalancedatareceived) Update the client balance when get new balance data.
|
||||
* [onBalanceChangeRateClicked](#onbalancechangerateclicked) Change the client balance rate.
|
||||
* [updateBalance](#updatebalance) Update the client balance.
|
||||
* [notifyBalance](#notifyblance) Notify the client balance.
|
||||
* [placeBet](#placebet) Set current client bet.
|
||||
* [clearBet](#clearbet) Clear current client bet<br/><br/>
|
||||
* [onSpinStart](#onspinstart) Update the client balance when user spin.
|
||||
* [onReplayHistory](#onreplayhistory) Indicates the game current state is resuming.
|
||||
* [onReplayHistoryEnd](#onreplayhistoryend) Indicates the game current state isn't resuming.
|
||||
* [onFastPlayDataReceived](#onfastokaydatareceived) Update the client balance when user playing Fast Play.
|
||||
|
||||
## Details
|
||||
|
||||
#### savedCurrentPoint
|
||||
> Current played bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L12)|
|
||||
|
||||
#### savedFreePoint
|
||||
> Current free point played bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:13](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L13)|
|
||||
|
||||
#### isResume
|
||||
> Indicates whether the game state is not resumed.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L14)|
|
||||
|
||||
#### onReplayHistoryClient
|
||||
> Indicates the game current state is resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:28](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L28)|
|
||||
|
||||
#### onResume
|
||||
> Indicates the game current state is resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L36)|
|
||||
|
||||
#### onResumeEnd
|
||||
> Indicates the game current state isn't resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L44)|
|
||||
|
||||
#### onDeposit
|
||||
> Update the client balance when user deposit.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:52](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L52)|
|
||||
|
||||
#### onConnected
|
||||
> Update the client balance when the game is connected.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:82](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L82)|
|
||||
|
||||
#### onStartGame
|
||||
> Show the client balance when the game is started.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:90](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L90)|
|
||||
|
||||
#### onCollectDataReceived
|
||||
> Update the client balance when the game is collected.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:99](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L99)|
|
||||
|
||||
#### onBalanceDataReceived
|
||||
> Update the client balance when get new balance data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:109](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L109)|
|
||||
|
||||
#### onBalanceChangeRateClicked
|
||||
> Change the client balance rate.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:117](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L117)|
|
||||
|
||||
#### updateBalance
|
||||
> Update the client balance.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L129)|
|
||||
|
||||
#### notifyBalance
|
||||
> Notify the client balance.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:141](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L141)|
|
||||
|
||||
#### placeBet
|
||||
> Set current client bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:151](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L151)|
|
||||
|
||||
#### clearBet
|
||||
> Clear current client bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/controller/balance-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/controller/balance-controller.js#L180)|
|
||||
|
||||
#### onSpinStart
|
||||
> Update the client balance when user spin.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L17)|
|
||||
|
||||
#### onReplayHistory
|
||||
> Indicates the game current state is resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L29)|
|
||||
|
||||
#### onReplayHistoryEnd
|
||||
>Indicates the game current state isn't resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L37)|
|
||||
|
||||
#### onFastPlayDataReceived
|
||||
> Update the client balance.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/balance-controller.js:45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/balance-controller.js#L45)|
|
80
api-doc/controllers/balance/balance-model.md
Normal file
80
api-doc/controllers/balance/balance-model.md
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Balance Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [currentPoint](#currentpoint) `Number` Current point.
|
||||
* [freePoint](#freepoint) `Number` Current free point.
|
||||
|
||||
### Methods
|
||||
* [SetCurrentPoint](#setcurrentpoint) Set current point.
|
||||
* [GetCurrentPoint](#getcurrentpoint) Get current point.
|
||||
* [SetFreePoint](#setfreepoint) Set current free point.
|
||||
* [GetFreePoint](#getfreepoint) Get current free point.
|
||||
* [GetAvailablePoint](#getavalablepoint) Get current point.
|
||||
* [isNumber](#isnumber) Indicates whether the value is number or not.
|
||||
|
||||
## Details
|
||||
|
||||
#### currentPoint
|
||||
> Current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:8](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
|
||||
|
||||
#### freePoint
|
||||
> Current free point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:9](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L9)|
|
||||
|
||||
#### SetCurrentPoint
|
||||
> Set current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:14](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L14)|
|
||||
|
||||
#### GetCurrentPoint
|
||||
> Get current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:21](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L21)|
|
||||
|
||||
#### SetFreePoint
|
||||
> Set Current free point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:27](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L27)|
|
||||
|
||||
#### GetFreePoint
|
||||
> Get current free point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:34](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L34)|
|
||||
|
||||
#### GetAvailablePoint
|
||||
> Get current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:40](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L40)|
|
||||
|
||||
#### isNumber
|
||||
> Indicates whether the value is number or not.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-game-core/src/model/balance-model.js:46](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/model/balance-model.js#L46)|
|
19
api-doc/controllers/balance/balance-view.md
Normal file
19
api-doc/controllers/balance/balance-view.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Balance View
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
* [BalanceChangeRate](#balancechangerate)
|
||||
|
||||
## Details
|
||||
|
||||
#### BalanceChangeRate
|
||||
> ...
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-game-core/src/view/balance-view.js:12](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/view/balance-view.js#L11)|
|
63
api-doc/controllers/initialize-controller.md
Normal file
63
api-doc/controllers/initialize-controller.md
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Initialize Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [resumeData ](#resumedata) `Object` Current played bet.
|
||||
|
||||
### Methods
|
||||
|
||||
* [_registerEvent](#_registerevent) Register events to get data from server.
|
||||
* [_start](#_start) Send request data to server.
|
||||
* [onConnected](#onconnected) Set resume data when connected server.
|
||||
* [onStartGame](#onstartgame) Start game when connected succesfully.
|
||||
* [startResumeGame](#startresumegame) Start game when connected succesfully with resume data.
|
||||
|
||||
## Details
|
||||
|
||||
#### resumeData
|
||||
> Current played bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L12)|
|
||||
|
||||
#### _registerEvent
|
||||
> Register events to get data from server.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L17)|
|
||||
|
||||
#### _start
|
||||
> Send request data to server.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L24)|
|
||||
|
||||
#### onConnected
|
||||
> Set resume data when connected server.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L32)|
|
||||
|
||||
#### onStartGame
|
||||
> Start game when connected succesfully.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L38)|
|
||||
|
||||
#### startResumeGame
|
||||
> Start game when connected succesfully with resume data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/initialize-controller.js:50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/initialize-controller.js#L50)|
|
@ -5,4 +5,8 @@ sidebar_position: 0
|
||||
|
||||
# Slot game API
|
||||
|
||||
## Slot Machine
|
||||
# Slot Game API
|
||||
## Slot Game Machine
|
||||
* [Balance Controller](controllers/balance-controller)
|
||||
To be written
|
Loading…
x
Reference in New Issue
Block a user