Compare commits
283 Commits
Author | SHA1 | Date | |
---|---|---|---|
e60dc1f8c2 | |||
11b20804f7 | |||
42579ec363 | |||
7ce84483f4 | |||
becb2e1b7d | |||
d7095199f7 | |||
67ff0e7dfb | |||
4b3f3d0c4b | |||
d6cefb2f5d | |||
0880aabbb9 | |||
26371736f8 | |||
3048a4246a | |||
354a70f887 | |||
ecadbe15a7 | |||
884e49a409 | |||
67ea5010bd | |||
f34b9748a9 | |||
01c8af1849 | |||
2747ce88d7 | |||
31095d8661 | |||
6115259d86 | |||
9802945713 | |||
57e3220c8f | |||
1f839c9aaa | |||
11d08bf006 | |||
527d6629b3 | |||
f3f4ecbab6 | |||
0a6c89c94b | |||
2af308f258 | |||
6ad5c9d960 | |||
3a32c4ee62 | |||
bfd25398c1 | |||
833ddaddcd | |||
aea8a96e38 | |||
ceeb5a2f27 | |||
5e7d8fdf4b | |||
774f6f230e | |||
7d8e871b6d | |||
c76f907436 | |||
6311137fda | |||
5139605454 | |||
d2318e5812 | |||
7bfcb42548 | |||
c315d5d87b | |||
f37cad54b6 | |||
80fc9681fd | |||
a2e744cea4 | |||
e59f02ee61 | |||
7ed56da6f2 | |||
7b3d9fa15c | |||
281fb96589 | |||
9ab8e70c35 | |||
1bf51a8f88 | |||
4eb5e80b46 | |||
aebe0c0c1e | |||
|
e2be9fd388 | ||
3d1d749d8b | |||
ca134e400e | |||
8b767952fd | |||
|
1f016b00d3 | ||
73499f10f1 | |||
|
2d64470df1 | ||
|
76bbdc2bfb | ||
fab78b7401 | |||
cfb4c48e0e | |||
7ee2e78201 | |||
5e2e3b7478 | |||
3b653ca8db | |||
|
1085057b0d | ||
|
99dcb7e447 | ||
|
763c605437 | ||
|
73e27c2a6b | ||
|
ade36e4a46 | ||
a1626d686a | |||
facc6467f8 | |||
42b04f3699 | |||
d5f802b758 | |||
839b4b3299 | |||
7516a2e805 | |||
fc46904076 | |||
d37fc77fae | |||
|
eaec124ba3 | ||
|
8827a62852 | ||
|
294b5cdc76 | ||
d403b91c16 | |||
f8040c0d45 | |||
1ccb10ac2b | |||
f9afa8ccf5 | |||
7ec0ed034b | |||
49eed4f05c | |||
7b2bd58d51 | |||
fb583110dd | |||
c12e9660ba | |||
85e105cbe8 | |||
5207567b5e | |||
87455b8b35 | |||
79de35fd6d | |||
3b723cf85a | |||
![]() |
73186c6e4f | ||
1c0bea7ddb | |||
![]() |
7470a245b7 | ||
67e12389e2 | |||
![]() |
571e36f3fb | ||
![]() |
d58199fe66 | ||
eaf5f7bf93 | |||
![]() |
8698a85773 | ||
93762f78ed | |||
64585891e2 | |||
e3b256d197 | |||
2d1cf47571 | |||
a6ab1d5236 | |||
b605a46228 | |||
b34e007b6b | |||
![]() |
b9bba2fe46 | ||
![]() |
fd94dd89ad | ||
d7ed9e65fc | |||
a001c0159c | |||
00db763161 | |||
ff85ceafef | |||
ea6c4462b8 | |||
d4726ab07b | |||
c339a68107 | |||
9aa5569124 | |||
7377174e87 | |||
|
9644b00bc5 | ||
|
066911efbf | ||
7435d6d29c | |||
|
3a5fdfeee6 | ||
|
1862aff0bc | ||
|
d8e4da4d20 | ||
26f6e23f47 | |||
|
7419b647ec | ||
|
6a47590e2b | ||
4158db0923 | |||
|
029ac1e24b | ||
|
884cb6fb12 | ||
|
cd6f876a1c | ||
|
a5f7d07d61 | ||
|
b127e81edf | ||
|
4e6d566bb2 | ||
|
5049ba7671 | ||
|
2d6c1e7872 | ||
813d442c47 | |||
|
484e49e106 | ||
|
2866cda5f2 | ||
e95aa14d0c | |||
|
3a744b30ab | ||
|
3e74750b6b | ||
|
9ac38f2211 | ||
|
f2b364c794 | ||
|
d15f07de03 | ||
|
a35ae44191 | ||
3c8120de19 | |||
3374d3516b | |||
d4a539b8b6 | |||
|
ea7a3be7f6 | ||
|
3a39971191 | ||
|
5d7ff09498 | ||
|
4aebeabe7d | ||
|
321794fe9c | ||
|
7e9ee66728 | ||
|
b4c1df7bd0 | ||
|
118c309575 | ||
|
9815c46cd9 | ||
|
89f3877352 | ||
|
10b1a51b1c | ||
590e65b3de | |||
e5ba545887 | |||
c402e229b7 | |||
|
1ea8fe9bfe | ||
|
26b4d0514d | ||
|
21297023ce | ||
37b652b26a | |||
51bc0673aa | |||
|
378dfe158c | ||
|
6f1511531f | ||
|
10c9b70487 | ||
|
c122094639 | ||
|
20d9688ad7 | ||
|
2593dbf8e0 | ||
|
531bb431c6 | ||
864e0bd6f9 | |||
6f5126d030 | |||
a1ed7d032b | |||
|
939f0b1689 | ||
|
88a4018c3b | ||
|
300892bc91 | ||
977905878a | |||
17fc18ebc2 | |||
2c8e47b294 | |||
f3ae46c8a5 | |||
|
9794c0dda0 | ||
|
8736b73221 | ||
|
8e569e8300 | ||
|
9ec517f3bd | ||
|
9c53e78623 | ||
|
b08c6b98d4 | ||
52ae5d2271 | |||
|
704ef7e92b | ||
|
487afe7972 | ||
c2c08e7de0 | |||
|
2d03d96c3e | ||
|
7b6edae84a | ||
|
290280d6c1 | ||
|
d8a2a0b9ee | ||
|
5c96a9e6ad | ||
|
d9c5a7f700 | ||
|
74929fc171 | ||
|
410d312102 | ||
b0417807c3 | |||
|
a64b8f8f6d | ||
|
5fa4b9fe40 | ||
|
d3ec058f35 | ||
01f58d0f82 | |||
|
9e6f6c9ce4 | ||
|
9961040eee | ||
|
273d7ea74c | ||
d1c23fc358 | |||
![]() |
cdc20630c3 | ||
f4cb4404f4 | |||
|
8f0cb654f7 | ||
2fafe77dcb | |||
|
91c7dc72b0 | ||
|
c85f734c6c | ||
|
8bb886b39e | ||
|
abc9490919 | ||
|
04750a2f6c | ||
|
8ff39e20ab | ||
|
24967cc02a | ||
a52051d602 | |||
5e371c8ea1 | |||
9f650ee83f | |||
6392b35984 | |||
|
e0be84a009 | ||
|
71d40aeead | ||
|
14bdacb4fe | ||
33b2ee346e | |||
|
cd15562317 | ||
492a047297 | |||
|
235c51509f | ||
|
7e836a98b9 | ||
32bb367dbe | |||
f714bc5696 | |||
b0e9033aa8 | |||
c6cfcc7bb1 | |||
7e7aa120f8 | |||
|
0c7ba2d7e4 | ||
|
1e9369f082 | ||
|
a2d661a051 | ||
|
e4d9a10c2e | ||
|
285f0e75e3 | ||
![]() |
d9f17ac6c7 | ||
![]() |
8bce3773c3 | ||
761f3cc0f6 | |||
|
be7cd44d12 | ||
4f42b1028a | |||
826c34d9d6 | |||
|
af3082568d | ||
|
e722339218 | ||
![]() |
3de5482ac2 | ||
7eb92cdb67 | |||
50fcdfbd84 | |||
|
a56efcaf23 | ||
|
b9765bc5fa | ||
|
2dce43771b | ||
7ff17f3b35 | |||
|
27afbac3e6 | ||
|
731bba650e | ||
b994bfb7de | |||
|
02f5e20a95 | ||
|
cf0d177743 | ||
830f82c479 | |||
![]() |
ecef7b24ce | ||
f0e549c3e7 | |||
|
364a928080 | ||
7a2002c98f | |||
|
072a8e8a16 | ||
d0769f7a57 | |||
|
1cc1061664 | ||
|
9e36bd7e68 | ||
fc381732b8 | |||
bbc12cae96 | |||
|
5d10c7a3ac |
25
README.md
Normal file
@ -0,0 +1,25 @@
|
||||
# Website
|
||||
|
||||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
|
||||
|
||||
### Installation
|
||||
|
||||
```
|
||||
$ npm install
|
||||
```
|
||||
|
||||
### Local Development
|
||||
|
||||
```
|
||||
$ npm start
|
||||
```
|
||||
|
||||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
|
||||
|
||||
### Build
|
||||
|
||||
```
|
||||
$ npm build
|
||||
```
|
||||
|
||||
This command generates static content into the `build` directory and can be served using any static contents hosting service.
|
16
api-doc/intro.md
Normal file
@ -0,0 +1,16 @@
|
||||
---
|
||||
id: intro
|
||||
sidebar_position: 0
|
||||
---
|
||||
|
||||
# Slot Game API
|
||||
|
||||
## Slot Game Machine
|
||||
* [Initialize](category/initialize)
|
||||
* [Balance](category/balance)
|
||||
* [Bet](category/bet)
|
||||
* [Spin](category/spin)
|
||||
* [After Spin](category/after-spin)
|
||||
* [Present Feature Trigger](category/present-feature-trigger)
|
||||
* [Auto Spin](category/after-spin)
|
||||
* [Take Or Gamble](category/take-or-gamble)
|
17
api-doc/slot-machine/_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/slot-machine/after-spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 5,
|
||||
"label": "After Spin",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "After Spin",
|
||||
"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",
|
||||
"afterspin"
|
||||
]
|
||||
}
|
||||
}
|
19
api-doc/slot-machine/after-spin/after-spin-controller.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# After Spin Controller
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
* [transitionToNextState](#transitiontonextstate) Check the condition and move to the next state.
|
||||
|
||||
## Details
|
||||
|
||||
#### transitionToNextState
|
||||
> Check the condition and move to the next state.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/after-spin-controller.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/after-spin-controller.js#L21)|
|
5
api-doc/slot-machine/after-spin/after-spin-model.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# After Spin Model
|
5
api-doc/slot-machine/after-spin/after-spin-view.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# After Spin View
|
18
api-doc/slot-machine/auto-spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 15,
|
||||
"label": "Auto Spin",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Auto Spin",
|
||||
"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",
|
||||
"auto-spin"
|
||||
]
|
||||
}
|
||||
}
|
353
api-doc/slot-machine/auto-spin/auto-spin-controller.md
Normal file
@ -0,0 +1,353 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Auto Spin Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [totalBet](#totalbet) `Number` Total current bet in a spin round.
|
||||
* [totalWin](#totalwin) `Number` Total win points collected.
|
||||
* [betLossAccumulation](#betlossaccumulation) `Number` Accumulated loss for checking loss limit condition.
|
||||
|
||||
### Methods
|
||||
|
||||
* [onSpinStarted](#onspinstarted) Decrements remaining auto spins and disables auto spin if none are left.
|
||||
* [onRoundEnd](#onroundend) Triggers win/loss limit checks at end of round.
|
||||
* [onTake](#ontake) Triggers win/loss limit checks when a take action occurs.
|
||||
* [onFreeroundsTriggered](#onfreeroundstriggered) Stops auto spin if freerounds are triggered.
|
||||
* [onPresentFreeroundsWinStarted](#onpresentfreeroundswinstarted) Stops auto spin on freeround win presentation.
|
||||
* [onMiniGameStarted](#onminigamestarted) Stops auto spin if a mini-game starts.
|
||||
* [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
|
||||
* [onAutoSpinActivated](#onautospinactivated) Activates auto spin mode.
|
||||
* [onAutoSpinDeactivated](#onautospindeactivated) Disables auto spin and resets `betLossAccumulation`.
|
||||
* [onAutoSpinQuantityChanged](#onautospinquantitychanged) Updates number of auto spins remaining.
|
||||
* [onFeatureTrigger](#onfeaturetrigger) Stops auto spin if feature is triggered and `stopOnFeatureTrigger` is enabled.
|
||||
* [onStopOnTriggerFeatureToggled](#onstopontriggerfeaturetoggled) Toggles stop-on-feature behavior.
|
||||
* [onLossLimitToggled](#onlosslimittoggled) Enables/disables auto-spin stop based on loss limit.
|
||||
* [onLossLimitValueChanged](#onlosslimitvaluechanged) Updates configured loss limit value.
|
||||
* [onWinLimitToggled](#onwinlimittoggled) Enables or disables win limit mode.
|
||||
* [onWinLimitValueChanged](#onwinlimitvaluechanged) Updates win limit threshold.
|
||||
* [onLobbyForcePauseGame](#onlobbyforcepausegame) Immediately stops auto spin when lobby forces pause.
|
||||
* [onLobbyAllowResumeGame](#onlobbyallowresumegame) No action defined.
|
||||
* [onDisconnected](#ondisconnected) Stops auto spin due to network disconnect.
|
||||
* [onError](#onerror) Stops auto spin when error occurs.
|
||||
* [onErrorAllowContinue](#onerrorallowcontinue) Stops auto spin when recoverable error is received.
|
||||
* [stopAutoSpin](#stopautospin) Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### totalBet
|
||||
|
||||
> Total current bet in a spin round.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L12)|
|
||||
|
||||
---
|
||||
|
||||
#### totalWin
|
||||
|
||||
> Total win points collected.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L13)|
|
||||
|
||||
---
|
||||
|
||||
#### betLossAccumulation
|
||||
|
||||
> Accumulated loss for checking loss limit condition.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L14)|
|
||||
|
||||
---
|
||||
|
||||
### Methods
|
||||
|
||||
#### onSpinStarted
|
||||
|
||||
Decrements remaining auto spins and disables auto spin if none are left.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L43](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L43)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
|
||||
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onRoundEnd
|
||||
|
||||
Triggers win/loss limit checks at end of round.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L55)|
|
||||
|
||||
---
|
||||
|
||||
#### onTake
|
||||
|
||||
Triggers win/loss limit checks when a take action occurs.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L61)|
|
||||
|
||||
---
|
||||
|
||||
#### onFreeroundsTriggered
|
||||
|
||||
Stops auto spin if freerounds are triggered.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L88](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L88)|
|
||||
|
||||
---
|
||||
|
||||
#### onPresentFreeroundsWinStarted
|
||||
|
||||
Stops auto spin on freeround win presentation.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L94](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L94)|
|
||||
|
||||
---
|
||||
|
||||
#### onMiniGameStarted
|
||||
|
||||
Stops auto spin if a mini-game starts.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L100](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L100)|
|
||||
|
||||
---
|
||||
|
||||
#### onBetDataChanged
|
||||
|
||||
Updates internal bet tracking based on input data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L106](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L106)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `betData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onAutoSpinActivated
|
||||
|
||||
Activates auto spin mode.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L112](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L112)|
|
||||
|
||||
---
|
||||
|
||||
#### onAutoSpinDeactivated
|
||||
|
||||
Disables auto spin and resets `betLossAccumulation` .
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L118](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L118)|
|
||||
|
||||
---
|
||||
|
||||
#### onAutoSpinQuantityChanged
|
||||
|
||||
Updates number of auto spins remaining.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L125](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L125)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onFeatureTrigger
|
||||
|
||||
Stops auto spin if:
|
||||
* A free spin is triggered.
|
||||
* The `stopOnFeatureTrigger` option in the UI is enabled in the model.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L131](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L131)|
|
||||
|
||||
---
|
||||
|
||||
#### onStopOnTriggerFeatureToggled
|
||||
|
||||
Toggles stop-on-feature behavior.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L139](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L139)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onLossLimitToggled
|
||||
|
||||
Enables/disables auto-spin stop based on loss limit.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L145](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L145)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onLossLimitValueChanged
|
||||
|
||||
Updates configured loss limit value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L151](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L151)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `lossLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onWinLimitToggled
|
||||
|
||||
Enables or disables win limit mode.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L157](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L157)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `isOn` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onWinLimitValueChanged
|
||||
|
||||
Updates win limit threshold.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L163](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L163)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `winLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### onLobbyForcePauseGame
|
||||
|
||||
Immediately stops auto spin when lobby forces pause.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L169](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L169)|
|
||||
|
||||
---
|
||||
|
||||
#### onLobbyAllowResumeGame
|
||||
|
||||
No action defined. Placeholder handler.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L174](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L174)|
|
||||
|
||||
---
|
||||
|
||||
#### onDisconnected
|
||||
|
||||
Stops auto spin due to network disconnect.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L176](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L176)|
|
||||
|
||||
---
|
||||
|
||||
#### onError
|
||||
|
||||
Stops auto spin when error occurs.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L181](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L181)|
|
||||
|
||||
---
|
||||
|
||||
#### onErrorAllowContinue
|
||||
|
||||
Stops auto spin when recoverable error is received.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L186](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L186)|
|
||||
|
||||
---
|
||||
|
||||
#### stopAutoSpin
|
||||
|
||||
Utility method to disable auto spin if currently active. Triggers `AutoSpinDeactivated` event.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/auto-spin-controller.js#L191](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/auto-spin-controller.js#L191)|
|
307
api-doc/slot-machine/auto-spin/auto-spin-model.md
Normal file
@ -0,0 +1,307 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Auto Spin Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
- [autoSpinLeft](#autospinleft) `Number` Remaining number of auto spins.
|
||||
- [isAutoSpin](#isautospin) `Boolean` Indicates whether auto spin is active.
|
||||
- [isStopOnFeatureTrigger](#isstoponfeaturetrigger) `Boolean` Whether to stop auto spin on feature trigger.
|
||||
- [winLimit](#winlimit) `Number` Win threshold for stopping auto spin.
|
||||
- [isWinLimitActive](#iswinlimitactive) `Boolean` Indicates whether win limit tracking is enabled.
|
||||
- [lossLimit](#losslimit) `Number` Loss threshold for stopping auto spin.
|
||||
- [isLossLimitActive](#islosslimitactive) `Boolean` Indicates whether loss limit tracking is enabled.
|
||||
|
||||
### Methods
|
||||
|
||||
- [SetAutoSpinLeft](#setautospinleft) Sets remaining number of auto spins.
|
||||
- [GetAutoSpinLeft](#getautospinleft) Gets remaining number of auto spins.
|
||||
- [SetIsAutoSpin](#setisautospin) Activates or deactivates auto spin.
|
||||
- [GetIsAutoSpin](#getisautospin) Returns the current auto spin status.
|
||||
- [SetIsStopOnFeatureTrigger](#setisstoponfeaturetrigger) Sets whether auto spin should stop on feature trigger.
|
||||
- [GetIsStopOnFeatureTrigger](#getisstoponfeaturetrigger) Gets stop-on-feature-trigger status.
|
||||
- [SetIsLossLimitActive](#setislosslimitactive) Enables or disables loss limit tracking.
|
||||
- [GetIsLossLimitActive](#getislosslimitactive) Returns whether loss limit is active.
|
||||
- [SetLossLimit](#setlosslimit) Sets the loss limit value.
|
||||
- [GetLossLimit](#getlosslimit) Gets the current loss limit value.
|
||||
- [SetIsWinLimitActive](#setiswinlimitactive) Enables or disables win limit tracking.
|
||||
- [GetIsWinLimitActive](#getiswinlimitactive) Returns whether win limit is active.
|
||||
- [SetWinLimit](#setwinlimit) Sets the win limit value.
|
||||
- [GetWinLimit](#getwinlimit) Gets the current win limit value.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### autoSpinLeft
|
||||
|
||||
> Remaining number of auto spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L9)|
|
||||
|
||||
---
|
||||
|
||||
#### isAutoSpin
|
||||
|
||||
> Indicates whether auto spin is active.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L10)|
|
||||
|
||||
---
|
||||
|
||||
#### isStopOnFeatureTrigger
|
||||
|
||||
> Whether to stop auto spin on feature trigger.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L11)|
|
||||
|
||||
---
|
||||
|
||||
#### winLimit
|
||||
|
||||
> Win threshold for stopping auto spin.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L12)|
|
||||
|
||||
---
|
||||
|
||||
#### isWinLimitActive
|
||||
|
||||
> Indicates whether win limit tracking is enabled.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L13)|
|
||||
|
||||
---
|
||||
|
||||
#### lossLimit
|
||||
|
||||
> Loss threshold for stopping auto spin.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L14)|
|
||||
|
||||
---
|
||||
|
||||
#### isLossLimitActive
|
||||
|
||||
> Indicates whether loss limit tracking is enabled.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L15)|
|
||||
|
||||
---
|
||||
|
||||
### Methods
|
||||
|
||||
#### SetAutoSpinLeft
|
||||
|
||||
Sets remaining number of auto spins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L20](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L20)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `autoSpinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetAutoSpinLeft
|
||||
|
||||
Gets remaining number of auto spins
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L26)|
|
||||
|
||||
---
|
||||
|
||||
#### SetIsAutoSpin
|
||||
|
||||
Activates or deactivates auto spin
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L32)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `isAutoSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetIsAutoSpin
|
||||
|
||||
Returns the current auto spin status.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L38)|
|
||||
|
||||
---
|
||||
|
||||
#### SetIsStopOnFeatureTrigger
|
||||
|
||||
Sets whether auto spin should stop on feature trigger.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#44)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
|
||||
- `isActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetIsStopOnFeatureTrigger
|
||||
|
||||
Gets stop-on-feature-trigger status
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Boolean |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#50)|
|
||||
|
||||
---
|
||||
|
||||
#### SetIsLossLimitActive
|
||||
|
||||
Enables or disables loss limit tracking.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#56)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `isLossLimitActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetIsLossLimitActive
|
||||
|
||||
Returns whether loss limit is active
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Boolean |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#62)|
|
||||
|
||||
---
|
||||
|
||||
#### SetLossLimit
|
||||
|
||||
Sets the loss limit value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L68)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `lossLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetLossLimit
|
||||
|
||||
Gets the current loss limit value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L74)|
|
||||
|
||||
---
|
||||
|
||||
#### SetIsWinLimitActive
|
||||
|
||||
Enables or disables win limit tracking
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L80)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `isWinLimitActive` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetIsWinLimitActive
|
||||
|
||||
Returns whether win limit is active.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Boolean |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L86](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L86)|
|
||||
|
||||
---
|
||||
|
||||
#### SetWinLimit
|
||||
|
||||
Sets the win limit value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L92)
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `winLimit` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### GetWinLimit
|
||||
|
||||
Gets the current win limit value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/auto-spin-model.js.js#L98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/auto-spin-model.js#L98)
|
15
api-doc/slot-machine/auto-spin/auto-spin-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Auto Spin view
|
||||
|
||||
## Overview
|
||||
|
||||
* AutoSpinView is a view class for the spin feature in the slot game. It extends the base View class and is intended to handle the visual representation and UI logic for spins.
|
||||
|
||||
## Description:
|
||||
* Initializes a new instance of AutoSpinView.
|
||||
* Calls the base View constructor.
|
||||
* [p4f-game-core/src/view/auto-spin-view.js:5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/auto-spin-view.js#L5)
|
||||
|
18
api-doc/slot-machine/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/slot-machine/balance/balance-controller.md
Normal file
@ -0,0 +1,176 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Balance Controller
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [savedCurrentPoint](#savedcurrentpoint) `Number` The current played bet.
|
||||
* [savedFreePoint](#savedfreepoint) `Number` The current free point played bet.
|
||||
* [isResume](#isresume) `Boolean` Indicates whether the game current state is resuming.
|
||||
|
||||
### 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
|
||||
> The current played bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| 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
|
||||
> The current free point played bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| 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/slot-machine/balance/balance-model.md
Normal file
@ -0,0 +1,80 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Balance Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [currentPoint](#currentpoint) `Number` The current point.
|
||||
* [freePoint](#freepoint) `Number` The current free point.
|
||||
|
||||
### Methods
|
||||
* [SetCurrentPoint](#setcurrentpoint) Set the current point.
|
||||
* [GetCurrentPoint](#getcurrentpoint) Get the current point.
|
||||
* [SetFreePoint](#setfreepoint) Set the current free point.
|
||||
* [GetFreePoint](#getfreepoint) Get the current free point.
|
||||
* [GetAvailablePoint](#getavalablepoint) Get the current point.
|
||||
* [isNumber](#isnumber) Indicates whether the value is number.
|
||||
|
||||
## Details
|
||||
|
||||
#### currentPoint
|
||||
> The 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
|
||||
> The 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 the 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 the 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 the 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 the 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 the 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.<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/slot-machine/balance/balance-view.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Balance View
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
* [BalanceChangeRate](#balancechangerate) Called when get new balance data.
|
||||
|
||||
## Details
|
||||
|
||||
#### BalanceChangeRate
|
||||
> Called when get new balance data.
|
||||
|
||||
| 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)|
|
18
api-doc/slot-machine/bet/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 3,
|
||||
"label": "Bet",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Bet",
|
||||
"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",
|
||||
"bet"
|
||||
]
|
||||
}
|
||||
}
|
332
api-doc/slot-machine/bet/bet-controller.md
Normal file
@ -0,0 +1,332 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Bet Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [isHistoryActivated](#ishistoryactivated) `Boolean` Indicates whether the game current state is resuming.
|
||||
* [availablePoint](#availablepoint) `Number` User's current point.
|
||||
* [waiterAutoSpin](#waiterautospin) `Timer` Base class actions that do have a finite time duration.
|
||||
* [betProcessorFactory](#betprocessorfactory) `BetProcessorFactory` Bet Processor Factory.
|
||||
* [betProcessor](#betprocessor) `BetProcessor` Current bet processor.
|
||||
|
||||
### Methods
|
||||
|
||||
* [CalculateTotalBet](#calculatetotalbet) Current total bet.
|
||||
* [onChangeBetMode](#onchangebetmode) Change bet mode.
|
||||
* [getClampedBet](#getclampedbet) The maximum bet that can be placed.
|
||||
* [_start](#_start) Initialize some logic which need to be called the game enters the Bet State.
|
||||
* [_registerEvent](#_registerevent) Register events.
|
||||
* [_complete](#_complete) Called when the game exits the Bet State.
|
||||
* [setBetPoints](#setbetpoints) Set the bet points.
|
||||
* [setBetPoint](#setbetpoint) Set the bet point.
|
||||
* [notifyBetDataChanged](#notifybetdatachanged) Notify the bet data is changed.
|
||||
* [onAutoSpinDeactivated](#onautospindeactivated) Progress the bet data when the user stop auto spin.
|
||||
* [onBetArrayReceived](#onbetarrayreceived) Progress the bet data get the bet array data.
|
||||
* [onBetMultiplierReceived](#onbetmultiplierreceived) Progress the bet data when get the bet multiplier data.
|
||||
* [onFreeroundsStarted](#onfreeroundsstarted) Progress the bet data when the free rounds start.
|
||||
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Progress the bet data when get the free rounds data.
|
||||
* [onMiniGameDataReceived](#onminigamedatareceived) Progress the bet data when get the mini game data.
|
||||
* [onResumeOrReplayGameRound](#onresumeorreplaygameround) Progress the bet data when resume the game.
|
||||
* [onBalanceChanged](#onbalancechanged) Progress the bet data when the balance change.
|
||||
* [onReplayHistoryClient](#onreplayhistoryclient) Progress the bet data when replay the game.
|
||||
* [onResume](#onresume) Progress the bet data when resume the game.
|
||||
* [onReplayHistory](#onreplayhistory) Progress the bet data when replay the game.
|
||||
* [onHistoryActivated](#onhistoryactivated) Progress the bet data when replay the game.
|
||||
* [onHistoryDeactivated](#onhistorydeactivated) Progress the bet data when replay the game.
|
||||
* [onStartGame](#onstartgame) Process the bet data when the game is started.
|
||||
* [onAutoSpinActivated](#onautospinactivated) Change the current game state to the Spin State.
|
||||
* [onSpinClicked](#onspinclicked) Change the current game state to the Spin State.
|
||||
* [onOutcomeSelected](#onoutcomeselected) Set the outcome data.
|
||||
* [onBetPointChanged](#onbetpointchanged) Progress the bet point.
|
||||
* [onBetMultiplierChanged](#onbetmultiplierchanged) Process the bet multiplier.
|
||||
* [onPaylineCountChanged](#onpaylinecountchanged) Process the bet data when the pay line is changed.
|
||||
* [getTotalBetPoint](#gettotalbetpoint) Get total bet point.
|
||||
* [spin](#spin) Process bet data and notify event Spin.
|
||||
* [onManualBuyBonusOpened](#onmanualbuybonusopened) Process the bet data when the user buy bonus.
|
||||
* [onManualBuyBonusClosed](#onmanualbuybonusclosed) Process the bet data when the user buy bonus.
|
||||
* [onManualBuyBonusChanged](#onmanualbuybonuschanged) Process the bet data when the user buy bonus.
|
||||
* [setBetByPowerPlayModel](#setbetbypowerplaymodel) Process the bet data when the user buy bonus.
|
||||
|
||||
## Details
|
||||
|
||||
#### isHistoryActivated
|
||||
> Indicates whether the game current state is resuming.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L35)|
|
||||
|
||||
#### availablePoint
|
||||
> User's current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L36)|
|
||||
|
||||
#### waiterAutoSpin
|
||||
> Base class actions that do have a finite time duration.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Timer](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/helper/timer.js#L4) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L37)|
|
||||
|
||||
#### betProcessorFactory
|
||||
> Bet Processor Factory.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [BetProcessorFactory](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L8) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L38)|
|
||||
|
||||
#### betProcessor
|
||||
> Current bet processor.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [BetProcessor](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/total-bet-processor/bet-processor-factory.js#L30) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:39](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L39)|
|
||||
|
||||
#### CalculateTotalBet
|
||||
> Current total bet.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L44)|
|
||||
|
||||
#### onChangeBetMode
|
||||
> Change bet mode.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L54)|
|
||||
|
||||
#### getClampedBet
|
||||
> The maximum bet that can be placed.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:64](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L64)|
|
||||
|
||||
#### _start
|
||||
> Initialize some logic which need to be called the game enters the Bet State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L77)|
|
||||
|
||||
#### _registerevent
|
||||
> Register events.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:112](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L112)|
|
||||
|
||||
#### _complete
|
||||
> Called when the game exits the Bet State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:129](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L129)|
|
||||
|
||||
#### setBetPoints
|
||||
> Set the bet points.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:139](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L139)|
|
||||
|
||||
#### setBetPoint
|
||||
> Set the bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:149](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L149)|
|
||||
|
||||
#### notifyBetDataChanged
|
||||
> Notify the bet data is changed.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:156](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L156)|
|
||||
|
||||
#### onAutoSpinDeactivated
|
||||
> Process the bet data when the user stop auto spin.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:180](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L180)|
|
||||
|
||||
#### onBetArrayReceived
|
||||
> Progress the bet data when get the bet array data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:197](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L197)|
|
||||
|
||||
#### onBetMultiplierReceived
|
||||
> Progress the bet data when get the bet multiplier data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:209](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L209)|
|
||||
|
||||
#### onFreeroundsStarted
|
||||
> Progress the bet data when the free rounds start.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:216](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L216)|
|
||||
|
||||
#### onFreeroundsDataReceived
|
||||
> Progress the bet data when get the free rounds data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:223](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#223)|
|
||||
|
||||
#### onMiniGameDataReceived
|
||||
> Progress the bet data when get the mini game data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:234](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L234)|
|
||||
|
||||
#### onResumeOrReplayGameRound
|
||||
> Progress the bet data when resume the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:245](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L245)|
|
||||
|
||||
#### onBalanceChanged
|
||||
> Progress the bet data when the balance change.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:254](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L254)|
|
||||
|
||||
#### onReplayHistoryClient
|
||||
> Progress the bet data when replay the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:263](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L263)|
|
||||
|
||||
#### onResume
|
||||
> Progress the bet data when resume the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:269](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L269)|
|
||||
|
||||
#### onReplayHistory
|
||||
> Progress the bet data when replay the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:275](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L275)|
|
||||
|
||||
#### onHistoryActivated
|
||||
> Progress the bet data when replay the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:281](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L281)|
|
||||
|
||||
#### onHistoryDeactivated
|
||||
> Progress the bet data when replay the game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:287](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L287)|
|
||||
|
||||
#### onAutoSpinActivated
|
||||
> Change the current game state to the Spin State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:309](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L309)|
|
||||
|
||||
#### onSpinClicked
|
||||
> Change the current game state to the Spin State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:153](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L315)|
|
||||
|
||||
#### onOutcomeSelected
|
||||
> Set the outcome data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:321](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L321)|
|
||||
|
||||
#### onBetPointChanged
|
||||
> Progress the bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:327](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L327)|
|
||||
|
||||
#### onBetMultiplierChanged
|
||||
> Process the bet multiplier.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:333](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L333)|
|
||||
|
||||
#### onPaylineCountChanged
|
||||
> Process the bet data when the pay line is changed.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:341](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L341)|
|
||||
|
||||
#### getTotalBetPoint
|
||||
> Get the total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:349](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L349)|
|
||||
|
||||
#### spin
|
||||
> Process bet data and notify event Spin.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:360](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L360)|
|
||||
|
||||
#### onManualBuyBonusOpened
|
||||
> Process the bet data when the user buy bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:375](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L375)|
|
||||
|
||||
#### onManualBuyBonusClosed
|
||||
> Process the bet data when the user buy bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:381](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L381)|
|
||||
|
||||
#### onManualBuyBonusChanged
|
||||
> Process the bet data when the user buy bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:386](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L386)|
|
||||
|
||||
#### setBetByPowerPlayModel
|
||||
> Process the bet data when the user buy bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/bet-controller.js:391](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/bet-controller.js#L391)|
|
288
api-doc/slot-machine/bet/bet-model.md
Normal file
@ -0,0 +1,288 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Bet Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [betPoints](#betpoints) `Array` The current the bet points.
|
||||
* [availableBetPoints](#availablebetpoints) `Array` The current available bet points that user can place.
|
||||
* [betPoint](#betpoint) `Number` The current bet point.
|
||||
* [minBetPoint](#minbetpoint) `Number` The current min bet point.
|
||||
* [savedBetPoint](#savedbetpoint) `Number` The current save point.
|
||||
* [betMultiplier](#betmultiplier) `Number` The current bet multiplier.
|
||||
* [paylineCount](#paylinecount) `Number` The current Pay Linecount.
|
||||
* [totalBetPoint](#totalbetpoint) `Number` The current total bet point.
|
||||
* [isBuyBonusActivated](#isbuybonusactivated) `Boolean` Indicates whether the user is buying a bonus.
|
||||
* [isFastPlayActivated](#isfastplayactivated) `Boolean` Indicates whether the user is playing fast play.
|
||||
* [outcome](#outcome) `Object` The current outcome.
|
||||
|
||||
### Methods
|
||||
* [SetBuyBonusActivated](#setbuybonusactivated) Set whether the user is buying a bonus.
|
||||
* [CheckBuyBonusActivated](#checkbuybonusactivated) Check whether the user is buying a bonus.
|
||||
* [SetFastPlayActivated](#setfastplayactivated) Set whether the user is playing fast play.
|
||||
* [CheckFastPlayActivated](#checkfastplayactivated) Check whether the user is playing fast play.
|
||||
* [SetOutcome](#setoutcome) Set the outcome data.
|
||||
* [SetBetPoints](#setbetpoints) Set the bet points.
|
||||
* [GetBetPoints](#getbetpoints) Get the bet points.
|
||||
* [SetBetPoint](#setbetpoints) Set the bet point.
|
||||
* [GetBetPoint](#getbetpoints) Get the bet point.
|
||||
* [SetMinTotalBet](#setbetpoints) Set the min total bet point.
|
||||
* [GetMinTotalBet](#getbetpoints) Get the min total bet point.
|
||||
* [SetAvailableBetPoints](#setbetpoints) Set the available bet points.
|
||||
* [GetAvailableBetPoints](#getbetpoints) Get the available bet points.
|
||||
* [SaveBetPoint](#savebetpoint) Save the bet point.
|
||||
* [GetSavedBetPoint](#getsavedbetpoint) Get the saved bet point.
|
||||
* [SetBetMultiplier](#setbetmultiplier) Set the bet multiplier.
|
||||
* [GetBetMultiplier](#getbetmultiplier) Get the bet multiplier.
|
||||
* [SetPaylineCount](#setpaylinecount) Set the payline count.
|
||||
* [GetPaylineCount](#getpaylinecount) Get the payline count.
|
||||
* [SetTotalBetPoint ](#Settotalbetpoint) Save the total bet point.
|
||||
* [GetTotalBetPoint ](#gettotalbetpoint) Get the total bet point.
|
||||
|
||||
## Details
|
||||
|
||||
#### betPoints
|
||||
> The current the bet points.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L11)|
|
||||
|
||||
#### availableBetPoints
|
||||
> The current available bet points that user can place.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L12)|
|
||||
|
||||
#### betPoint
|
||||
> The current bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L13)|
|
||||
|
||||
#### minBetPoint
|
||||
> The current min bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L14)|
|
||||
|
||||
#### savedbetPoint
|
||||
> The current save point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L15)|
|
||||
|
||||
#### betMultiplier
|
||||
> The current bet multiplier.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L16)|
|
||||
|
||||
#### payLineCount
|
||||
> The current Pay Linecount.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L17)|
|
||||
|
||||
#### totalBetPoint
|
||||
> The current total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L18)|
|
||||
|
||||
#### isBuyBonusActivated
|
||||
> Indicates whether the user is buying a bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:19](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L19)|
|
||||
|
||||
#### isFastPlayActivated
|
||||
> Indicates whether the user is playing fast play.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:20](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L20)|
|
||||
|
||||
#### outCome
|
||||
> The current outcome.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L21)|
|
||||
|
||||
#### SetBuyBonusActivated
|
||||
> Set whether the user is buying a bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L26)|
|
||||
|
||||
#### CheckBuyBonusActivated
|
||||
> Check whether the user is buying a bonus.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L32)|
|
||||
|
||||
#### SetFastPlayActivated
|
||||
> Set whether the user is playing fast play.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L38)|
|
||||
|
||||
#### CheckFastPlayActivated
|
||||
> Check whether the user is playing fast play.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L44)|
|
||||
|
||||
#### SetOutcome
|
||||
> Set the outcome data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L50)|
|
||||
|
||||
#### GetOutcome
|
||||
> Get the outcome data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L56)|
|
||||
|
||||
#### SetBetPoints
|
||||
> Set the bet points.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L62)|
|
||||
|
||||
|
||||
#### GetBetPoints
|
||||
> Get bet points<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L68)|
|
||||
|
||||
#### SetBetPoint
|
||||
> Set the bet point<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L98)|
|
||||
|
||||
#### GetBetPoint
|
||||
> Get the bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:104](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L104)|
|
||||
|
||||
#### SetMinTotalBet
|
||||
> Set the min total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L74)|
|
||||
|
||||
#### GetMinTotalBet
|
||||
> Get the min total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L80)|
|
||||
|
||||
#### SetAvailableBetPoints
|
||||
> Set the available bet points.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:86](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L86)|
|
||||
|
||||
#### GetAvailableBetPoints
|
||||
> Get the available bet points.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L92)|
|
||||
|
||||
#### SaveBetPoint
|
||||
> Set the bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:110](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L110)|
|
||||
|
||||
#### GetSavedBetPoint
|
||||
> Get the saved bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:116](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L116)|
|
||||
|
||||
#### SetBetMultiplier
|
||||
> Set the bet multiplier.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:122](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L122)|
|
||||
|
||||
#### GetBetMultiplier
|
||||
> Get the bet multiplier.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:128](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L128)|
|
||||
|
||||
#### SetPaylineCount
|
||||
> Set the payline count.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:134](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L134)|
|
||||
|
||||
#### GetPaylineCount
|
||||
> Get the payline count.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:141](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L141)|
|
||||
|
||||
#### SetTotalBetPoint
|
||||
> Set the total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:147](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L147)|
|
||||
|
||||
#### GetTotalBetPoint
|
||||
> Get the total bet point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bet-model.js:153](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/bet-model.js#L153)|
|
19
api-doc/slot-machine/bet/bet-view.md
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Bet View
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
* [RefreshView](#refreshview)
|
||||
|
||||
## Details
|
||||
|
||||
#### RefreshView
|
||||
> ...
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/bet-view.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/bet-view.js#L13)|
|
18
api-doc/slot-machine/bonus-game/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 26,
|
||||
"label": "Bonus Game",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Bonus 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",
|
||||
"bonus game"
|
||||
]
|
||||
}
|
||||
}
|
122
api-doc/slot-machine/bonus-game/bonus-game-controller.md
Normal file
@ -0,0 +1,122 @@
|
||||
---
|
||||
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) |
|
235
api-doc/slot-machine/bonus-game/bonus-game-model.md
Normal file
@ -0,0 +1,235 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Bonus Game Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [random](#random) `Object` Stores RNG outcome data.
|
||||
* [bonusData](#bonusdata) `Object` Stores bonus game result details.
|
||||
* [currentSelectionItem](#currentselectionitem) `Number` Index of current selected item.
|
||||
* [lifePoint](#lifepoint) `Number` Remaining life in the bonus game.
|
||||
* [type](#type) `Number` Type of bonus game.
|
||||
|
||||
### Methods
|
||||
|
||||
* [SetRandom](#setrandom) Sets the random number.
|
||||
* [GetRandom](#getrandom) Returns the stored random data.
|
||||
* [SetLifePoint](#setlifepoint) Sets the number of remaining life points.
|
||||
* [GetLifePoint](#getlifepoint) Returns the current life points.
|
||||
* [SetType](#settype) Sets the bonus game type.
|
||||
* [GetType](#gettype) Returns the current type.
|
||||
* [SetCurrentSelectionItem](#setcurrentselectionitem) Sets the index of the selected item.
|
||||
* [GetCurrentSelectionItem](#getcurrentselectionitem) Returns the selected item index.
|
||||
* [SetBonusData](#setbonusdata) Sets the bonus data object.
|
||||
* [GetBonusData](#getbonusdata) Gets the full bonus data object.
|
||||
* [GetTotalWinPoint](#gettotalwinpoint) Returns total win points from bonus data.
|
||||
* [CheckBonusEnd](#checkbonusend) Checks if bonus game has ended.
|
||||
* [GetResultData](#getresultdata) Returns the current turn result data.
|
||||
* [GetBonusTurnItem](#getbonusturnitem) Returns the selected item for current bonus turn.
|
||||
* [GetBonusTurnWinPoint](#getbonusturnwinpoint) Returns the win point of current bonus turn.
|
||||
* [GetBonusTurnLifePoint](#getbonusturnlifepoint) Returns the life point remaining for current bonus turn.
|
||||
* [GetBonusTurnPayout](#getbonusturnpayout) Returns the payout of the current bonus turn.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### random
|
||||
|
||||
> Stores RNG outcome data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L9) |
|
||||
|
||||
#### bonusData
|
||||
|
||||
> Stores bonus game result details.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L10) |
|
||||
|
||||
#### currentSelectionItem
|
||||
|
||||
> Index of current selected item.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L11) |
|
||||
|
||||
### Methods
|
||||
|
||||
#### SetRandom
|
||||
|
||||
Sets the random number.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L18) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `random` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
</p>
|
||||
|
||||
#### GetRandom
|
||||
|
||||
Returns the stored random data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L24) |
|
||||
|
||||
#### SetLifePoint
|
||||
|
||||
Sets the number of remaining life points.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L30) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `lifePoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
</p>
|
||||
|
||||
#### GetLifePoint
|
||||
|
||||
Returns the current life points.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L36](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L36) |
|
||||
|
||||
#### SetType
|
||||
|
||||
Sets the bonus game type.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L42) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `type` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
|
||||
|
||||
</p>
|
||||
|
||||
#### GetType
|
||||
|
||||
Returns the current type.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L48](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L48) |
|
||||
|
||||
#### SetCurrentSelectionItem
|
||||
|
||||
Sets the index of the selected item.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L54](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L54) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `selectionIndex` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
</p>
|
||||
|
||||
#### GetCurrentSelectionItem
|
||||
|
||||
Returns the selected item index.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L60](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L60) |
|
||||
|
||||
#### SetBonusData
|
||||
|
||||
Sets the bonus data object.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L66](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L66) |
|
||||
|
||||
#### GetBonusData
|
||||
|
||||
Gets the full bonus data object.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L72](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L72) |
|
||||
|
||||
#### GetTotalWinPoint
|
||||
|
||||
Returns total win points from bonus data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L78](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L78) |
|
||||
|
||||
#### CheckBonusEnd
|
||||
|
||||
Checks if bonus game has ended.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L84](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L84) |
|
||||
|
||||
#### GetResultData
|
||||
|
||||
Returns the current turn result data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L90](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L90) |
|
||||
|
||||
#### GetBonusTurnItem
|
||||
|
||||
Returns the selected item for current bonus turn.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L96](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L96) |
|
||||
|
||||
#### GetBonusTurnWinPoint
|
||||
|
||||
Returns the win point of current bonus turn.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L102](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L102) |
|
||||
|
||||
#### GetBonusTurnLifePoint
|
||||
|
||||
Returns the life point remaining for current bonus turn.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L111](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L111) |
|
||||
|
||||
#### GetBonusTurnPayout
|
||||
|
||||
Returns the payout of the current bonus turn.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/bonus-game-model.js#L114](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/bonus-game-model.js#L114) |
|
14
api-doc/slot-machine/bonus-game/bonus-game-view.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Bonus Game View
|
||||
|
||||
## Overview
|
||||
|
||||
Creates a new instance of the `BonusGameView`. It inherits functionality from the `View` class of `P4FCore`.
|
||||
|
||||
## Description:
|
||||
* Initializes a new instance of BonusGameView.
|
||||
* Calls the base View constructor.
|
||||
* [p4f-slotty-core/src/view/bonus-game-view.js#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/bonus-game-view.js#L5)
|
18
api-doc/slot-machine/end-round/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 36,
|
||||
"label": "End Round",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "End Round",
|
||||
"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",
|
||||
"end-round"
|
||||
]
|
||||
}
|
||||
}
|
69
api-doc/slot-machine/end-round/end-round-controller.md
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
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) |
|
17
api-doc/slot-machine/end-round/end-round-model.md
Normal file
@ -0,0 +1,17 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# EndRoundModel
|
||||
|
||||
## Overview
|
||||
|
||||
`EndRoundModel` is a model class for managing the end-of-round logic in the slot machine game. It extends the base model class and is responsible for handling the visual representation and UI logic related to the end of a spin.
|
||||
|
||||
## Description
|
||||
|
||||
* Initializes a new instance of `EndRoundModel`.
|
||||
* Calls the base model constructor.
|
||||
* Handles end-of-round events and updates the UI accordingly.
|
||||
|
||||
[Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5)
|
15
api-doc/slot-machine/end-round/end-round-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# EndRoundView
|
||||
|
||||
## Overview
|
||||
|
||||
EndRoundView is a UI component for managing the end-of-round visuals in the slot machine game. It extends the base View class, providing logic and presentation for the spin completion state.
|
||||
|
||||
## Description
|
||||
|
||||
* Constructs a new EndRoundView instance.
|
||||
* Invokes the base View constructor for initialization.
|
||||
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5)
|
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
@ -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) |
|
91
api-doc/slot-machine/free-game/free-game-model.md
Normal file
@ -0,0 +1,91 @@
|
||||
---
|
||||
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) |
|
15
api-doc/slot-machine/free-game/free-game-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
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.
|
||||
|
||||
## Description
|
||||
|
||||
* Constructs a new FreeroundsView instance.
|
||||
* Invokes the base View constructor for initialization.
|
||||
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/free-game-view.js#L6)
|
18
api-doc/slot-machine/freeround/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 24,
|
||||
"label": "Freeround Game",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Freeround 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",
|
||||
"freeround-game"
|
||||
]
|
||||
}
|
||||
}
|
234
api-doc/slot-machine/freeround/freerounds-controller.md
Normal file
@ -0,0 +1,234 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Freerounds Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
### Methods
|
||||
|
||||
* [_start](#_start) Initializes freerounds session and presents appropriate dialogs based on state.
|
||||
* [_complete](#_complete) Clears timers and unregisters auto-spin deactivation events.
|
||||
* [_registerEvent](#_registerevent) Registers relevant network and game events.
|
||||
* [presentDialog](#presentdialog) Displays appropriate freerounds dialog based on configuration.
|
||||
* [onFreeroundsDataReceived](#onfreeroundsdatareceived) Handles incoming freerounds data and updates model.
|
||||
* [onFreeroundsTotalWinPointReceived](#onfreeroundstotalwinpointreceived) Updates model with total win points.
|
||||
* [onSelectFreeroundsDataReceived](#onselectfreeroundsdatareceived) Processes selected freerounds data.
|
||||
* [onFreeroundsReadyToPlay](#onfreeroundsreadytoplay) Continues the game when ready.
|
||||
* [onStartFreeroundsClicked](#onstartfreeroundsclicked) Handles player clicking to start freerounds.
|
||||
* [onSkipFreeroundsClicked](#onskipfreeroundsclicked) Skips the current freerounds selection screen.
|
||||
* [onHideFreeroundsWinClicked](#onhidefreeroundswinclicked) Finalizes win screen and resets related states.
|
||||
* [onAutoSpinActivated](#onautospinactivated) Triggers spin automatically if conditions met.
|
||||
* [onSpinClicked](#onspinclicked) Triggers spin on user interaction.
|
||||
* [onAutoSpinDeactivated](#onautospindeactivated) Stops any auto-spin delay timers.
|
||||
* [selectFreeroundsCompleted](#selectfreeroundscompleted) Finalizes selection and initializes freerounds session.
|
||||
* [continue](#continue) Determines game flow after selection or spin completion.
|
||||
* [spin](#spin) Executes one spin of the freeround feature.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
### Methods
|
||||
|
||||
#### _start
|
||||
|
||||
Initializes freerounds session and presents appropriate dialogs based on state
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L22) |
|
||||
|
||||
#### _complete
|
||||
|
||||
Clears timers and unregisters auto-spin deactivation events.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L40) |
|
||||
|
||||
#### _registerEvent
|
||||
|
||||
Registers relevant network and game events.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L47) |
|
||||
|
||||
#### presentDialog
|
||||
|
||||
Displays appropriate freerounds dialog based on configuration.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L59) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `freeroundsData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `spinPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
* `allowChangeOptions` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
#### onFreeroundsDataReceived
|
||||
|
||||
Handles incoming freerounds data and updates model.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L83](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L83) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `spinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `freeroundsID` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### onFreeroundsTotalWinPointReceived
|
||||
|
||||
Updates model with total win points.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L98](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L98) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
|
||||
`totalWinPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
</p>
|
||||
|
||||
#### onSelectFreeroundsDataReceived
|
||||
|
||||
Processes selected freerounds data.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L106](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L106) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
|
||||
`data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
</p>
|
||||
|
||||
#### onFreeroundsReadyToPlay
|
||||
|
||||
Continues the game when ready.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L114](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L114) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
|
||||
`data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
</p>
|
||||
|
||||
#### onStartFreeroundsClicked
|
||||
|
||||
Handles player clicking to start freerounds.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L122](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L122) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
|
||||
`optionIndex` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
</p>
|
||||
|
||||
#### onSkipFreeroundsClicked
|
||||
|
||||
Skips the current freerounds selection screen.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L136](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L136) |
|
||||
|
||||
#### onHideFreeroundsWinClicked
|
||||
|
||||
Finalizes win screen and resets related states.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L145](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L145) |
|
||||
|
||||
#### onAutoSpinActivated
|
||||
|
||||
Triggers spin automatically if conditions met.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L164](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L164) |
|
||||
|
||||
#### onSpinClicked
|
||||
|
||||
Triggers spin on user interaction.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L172](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L172) |
|
||||
|
||||
#### onAutoSpinDeactivated
|
||||
|
||||
Stops any auto-spin delay timers.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L180](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L180) |
|
||||
|
||||
#### selectFreeroundsCompleted
|
||||
|
||||
Finalizes selection and initializes freerounds session.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L191](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L191) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `freeroundsData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `freeroundsID` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `spinCount` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `spinPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
|
||||
</p>
|
||||
|
||||
#### continue
|
||||
|
||||
Determines game flow after selection or spin completion.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L214](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L214) |
|
||||
|
||||
#### spin
|
||||
|
||||
Executes one spin of the freeround feature.
|
||||
|
||||
| meta | description |
|
||||
|:-----|:------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/freerounds-controller.js#L227](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/freerounds-controller.js#L227) |
|
258
api-doc/slot-machine/freeround/freerounds-model.md
Normal file
@ -0,0 +1,258 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Freerounds Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [arrFreeroundsData](#arrfreeroundsdata) Stores the list of available freerounds data.
|
||||
* [betPoint](#betpoint) Current bet point used in the freerounds.
|
||||
* [freeroundsID](#freeroundsid) Identifier of the current freerounds session.
|
||||
* [totalFreerounds](#totalfreerounds) Total number of freerounds awarded.
|
||||
* [freeroundsPlayed](#freeroundsplayed) Number of freerounds already played.
|
||||
* [totalWinPoint](#totalwinpoint) Accumulated win points from freerounds.
|
||||
|
||||
### Methods
|
||||
|
||||
* [SetArrayFreeroundsData](#setarrayfreeroundsdata) Stores an array of freerounds data.
|
||||
* [GetFreeroundsData](#getfreeroundsdata) Retrieves the first item from the freerounds data array.
|
||||
* [ShiftFreeroundsData](#shiftfreeroundsdata) Removes and returns the first element from the freerounds data array.
|
||||
* [SetFreeroundsID](#setfreeroundsid) Sets the freerounds session ID.
|
||||
* [GetFreeroundsID](#getfreeroundsid) Retrieves the current freerounds session ID.
|
||||
* [SetBetPoint](#setbetpoint) Sets the bet point value.
|
||||
* [GetBetPoint](#getbetpoint) Gets the current bet point value.
|
||||
* [SetTotalFreerounds](#settotalfreerounds) Sets the total number of freerounds available.
|
||||
* [GetTotalFreerounds](#gettotalfreerounds) Gets the total number of freerounds.
|
||||
* [SetFreeroundsPlayed](#setfreeroundsplayed) Sets the number of freerounds that have been played.
|
||||
* [GetFreeroundsPlayed](#getfreeroundsplayed) Gets the number of freerounds played.
|
||||
* [CheckFreeroundsCompleted](#checkfreeroundscompleted) Checks whether all freerounds have been completed.
|
||||
* [SetTotalWinPoint](#settotalwinpoint) Sets the total accumulated win points.
|
||||
* [GetTotalWinPoint](#gettotalwinpoint) Gets the total win points earned in freerounds.
|
||||
* [GetFreeroundsLeft](#getfreeroundsleft) Calculates how many freerounds are remaining.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### arrFreeroundsData
|
||||
|
||||
> Stores the list of available freerounds data.
|
||||
|
||||
| meta | description |
|
||||
|------|-------|
|
||||
| Type | [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L7](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L7) |
|
||||
|
||||
#### betPoint
|
||||
|
||||
> Current bet point used in the freerounds.
|
||||
|
||||
| meta | description |
|
||||
|------|--------|
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L8) |
|
||||
|
||||
#### freeroundsID
|
||||
|
||||
> Identifier of the current freerounds session.
|
||||
|
||||
| meta | description |
|
||||
|------|--------|
|
||||
| Type | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L9) |
|
||||
|
||||
#### totalFreerounds
|
||||
|
||||
> Total number of freerounds awarded.
|
||||
|
||||
| meta | description |
|
||||
|------|--------|
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L10) |
|
||||
|
||||
#### freeroundsPlayed
|
||||
|
||||
> Number of freerounds already played.
|
||||
|
||||
| meta | description |
|
||||
|------|--------|
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L11) |
|
||||
|
||||
#### totalWinPoint
|
||||
|
||||
> Accumulated win points from freerounds.
|
||||
|
||||
| meta | description |
|
||||
|------|--------|
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L12) |
|
||||
|
||||
### Methods
|
||||
|
||||
#### SetArrayFreeroundsData
|
||||
|
||||
Stores an array of freerounds data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L13) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `arrFreeroundsData` [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)
|
||||
</p>
|
||||
|
||||
#### GetFreeroundsData
|
||||
|
||||
Retrieves the first item from the freerounds data array.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L17) |
|
||||
|
||||
#### ShiftFreeroundsData
|
||||
|
||||
Removes and returns the first element from the freerounds data array.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L21) |
|
||||
|
||||
#### SetFreeroundsID
|
||||
|
||||
Sets the freerounds session ID.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L25](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L25) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `freeroundsID` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
|
||||
</p>
|
||||
|
||||
#### GetFreeroundsID
|
||||
|
||||
Retrieves the current freerounds session ID.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L29) |
|
||||
|
||||
#### SetBetPoint
|
||||
|
||||
Sets the bet point value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L33](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L33) |
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetBetPoint
|
||||
|
||||
Gets the current bet point value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L37) |
|
||||
|
||||
#### SetTotalFreerounds
|
||||
|
||||
Sets the total number of freerounds available.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L41) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalFreerounds` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetTotalFreerounds
|
||||
|
||||
Gets the total number of freerounds.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L45) |
|
||||
|
||||
#### SetFreeroundsPlayed
|
||||
|
||||
Sets the number of freerounds that have been played.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L49](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L49) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `freeroundsPlayed` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetFreeroundsPlayed
|
||||
|
||||
Gets the number of freerounds played.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L53](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L53) |
|
||||
|
||||
#### CheckFreeroundsCompleted
|
||||
|
||||
Checks whether all freerounds have been completed.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L57) |
|
||||
|
||||
#### SetTotalWinPoint
|
||||
|
||||
Sets the total accumulated win points.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L61) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalWinPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetTotalWinPoint
|
||||
|
||||
Gets the total win points earned in freerounds.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L65) |
|
||||
|
||||
#### GetFreeroundsLeft
|
||||
|
||||
Calculates how many freerounds are remaining.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/freerounds-model.js#L69](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/freerounds-model.js#L69) |
|
14
api-doc/slot-machine/freeround/freerounds-view.md
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Freerounds View
|
||||
|
||||
## Overview
|
||||
The `FreeroundsView` component manages the user interface for free rounds in the slot machine game. It is responsible for displaying relevant visuals, handling UI transitions, and triggering animations when the game enters or exits Free Round mode.
|
||||
|
||||
## Description
|
||||
|
||||
* Constructs a new FreeroundsView instance.
|
||||
* Invokes the base View constructor for initialization.
|
||||
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/freerounds-view.js#L5)
|
18
api-doc/slot-machine/info/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 23,
|
||||
"label": "Info",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Info",
|
||||
"description": "This section provides information about the Info Game.",
|
||||
"keywords": [
|
||||
"controller",
|
||||
"project",
|
||||
"repository",
|
||||
"model",
|
||||
"info-game"
|
||||
]
|
||||
}
|
||||
}
|
33
api-doc/slot-machine/info/info-controller.md
Normal file
@ -0,0 +1,33 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Info Controller
|
||||
|
||||
## Index
|
||||
|
||||
## Properties
|
||||
|
||||
## Methods
|
||||
|
||||
* [onPaytableInitialized](#onpaytableinitialized) Handles the `PaytableInitialized` event by setting the total number of paytable pages.
|
||||
|
||||
## Details
|
||||
|
||||
## Properties
|
||||
|
||||
## Methods
|
||||
|
||||
### onPaytableInitialized
|
||||
|
||||
Handles the `PaytableInitialized` event by setting the total number of paytable pages.
|
||||
|
||||
| meta | description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/info-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/info-controller.js#L14) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalPages` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
62
api-doc/slot-machine/info/info-model.md
Normal file
@ -0,0 +1,62 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Info Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
- [totalPages](#totalpages) `Number` Tracks total number of info pages.
|
||||
|
||||
### Methods
|
||||
|
||||
- [GetTotalPages](#gettotalpages) Returns total number of paytable pages.
|
||||
- [SetTotalPages](#settotalpages) Sets the total number of paytable pages.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### totalPages
|
||||
|
||||
> Tracks the total number of paytable pages.
|
||||
|
||||
| meta | description |
|
||||
|------|-------------|
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/info-model.js#L6](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L6) |
|
||||
|
||||
---
|
||||
|
||||
## Methods
|
||||
|
||||
### GetTotalPages
|
||||
|
||||
Returns the total number of pages currently stored.
|
||||
|
||||
| meta | description |
|
||||
|------|-------------|
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/info-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L12) |
|
||||
|
||||
---
|
||||
|
||||
### SetTotalPages
|
||||
|
||||
Sets the total number of paytable pages.
|
||||
|
||||
**Returns:** `void`
|
||||
|
||||
| meta | description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/model/info-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/info-model.js#L17) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalPages` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
15
api-doc/slot-machine/info/info-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Info View
|
||||
|
||||
## Overview
|
||||
|
||||
`InfoView` is a user interface component responsible for displaying end-of-round visuals in the slot machine game. It manages UI transitions and animations, particularly when the game enters Free Round mode, ensuring a smooth and engaging player experience during these state changes.
|
||||
|
||||
## Description
|
||||
|
||||
* Constructs a new InfoView instance.
|
||||
* Invokes the base View constructor for initialization.
|
||||
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/info-view.js#L5)
|
18
api-doc/slot-machine/initialize/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 1,
|
||||
"label": "Initialize",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Initialize",
|
||||
"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",
|
||||
"initialize"
|
||||
]
|
||||
}
|
||||
}
|
63
api-doc/slot-machine/initialize/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)|
|
18
api-doc/slot-machine/pickup/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 27,
|
||||
"label": "Pickup",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Pickup",
|
||||
"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",
|
||||
"pickup"
|
||||
]
|
||||
}
|
||||
}
|
91
api-doc/slot-machine/pickup/pickup-controller.md
Normal file
@ -0,0 +1,91 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
# Pickup Controller
|
||||
---
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [_registerEvent](#_registerevent) — Registers events related to pickups.
|
||||
- [onViewPickupItem](#onviewpickupitem) — Handles item selection initiated from the view.
|
||||
- [onViewPresentPickupResultCompleted](#onviewpresentpickupresultcompleted) — Handles result display completion from the view.
|
||||
- [onPickupItemReceived](#onpickupitemreceived) — Handles the event when an item result is received.
|
||||
- [onPickupReady](#onpickupready) — Called when the pickup feature becomes available.
|
||||
- [pickup](#pickup) — Sends a request to pick up an item.
|
||||
- [pickupEnd](#pickupend) — Handles the end of the pickup feature and notifies listeners.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### _registerEvent
|
||||
|
||||
Registers events related to pickups.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L17) |
|
||||
|
||||
---
|
||||
|
||||
#### onViewPickupItem
|
||||
|
||||
Handles item selection initiated from the view.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L23) |
|
||||
|
||||
---
|
||||
|
||||
#### onViewPresentPickupResultCompleted
|
||||
|
||||
Handles result display completion from the view.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L30](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L30) |
|
||||
|
||||
---
|
||||
|
||||
#### onPickupItemReceived
|
||||
|
||||
Handles the event when an item result is received..
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L37) |
|
||||
|
||||
---
|
||||
|
||||
#### onPickupReady
|
||||
|
||||
Called when the pickup feature becomes available.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L45) |
|
||||
|
||||
---
|
||||
|
||||
#### pickup
|
||||
|
||||
Sends a request to pick up an item
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L55) |
|
||||
|
||||
---
|
||||
|
||||
#### pickupEnd
|
||||
|
||||
Handles the end of the pickup feature and notifies listeners.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/controller/pickup-controller.js#L63](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/pickup-controller.js#L63) |
|
58
api-doc/slot-machine/pickup/pickup-model.md
Normal file
@ -0,0 +1,58 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
# Pickup Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
- [pickupResult](#pickupresult) — Stores the result of the pickup.
|
||||
|
||||
### Methods
|
||||
|
||||
- [SetPickupResult](#setpickupresult) — Updates the current pickup result.
|
||||
- [GetPickupResult](#getpickupresult) — Returns the current pickup result stored in the model.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### pickupResult
|
||||
|
||||
> Stores the result of the pickup.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) |
|
||||
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L8) |
|
||||
|
||||
---
|
||||
|
||||
### Methods
|
||||
|
||||
#### SetPickupResult
|
||||
|
||||
Updates the current pickup result.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L13) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `result` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
---
|
||||
|
||||
#### GetPickupResult
|
||||
|
||||
Returns the current pickup result stored in the model
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Returns | Object |
|
||||
| Defined in | [p4f-slotty-core/src/model/pickup-model.js#L18](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/pickup-model.js#L18) |
|
59
api-doc/slot-machine/pickup/pickup-view.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Pickup View
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [PickupItem](#pickupitem) — Triggers item pickup event.
|
||||
- [PresentPickupResultCompleted](#presentpickupresultcompleted) — Notifies when pickup result display is complete.
|
||||
- [PresentPickupResult](#presentpickupresult) — Emits the result of a pickup event.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### PickupItem
|
||||
|
||||
Triggers item pickup event.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L14) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `itemID` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
|
||||
---
|
||||
|
||||
#### PresentPickupResultCompleted
|
||||
|
||||
Notifies when pickup result display is complete
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L19](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L19) |
|
||||
|
||||
---
|
||||
|
||||
#### PresentPickupResult
|
||||
|
||||
Emits the result of a pickup event.
|
||||
|
||||
| Meta | Description |
|
||||
|------|-------------|
|
||||
| Defined in | [p4f-slotty-core/src/view/pickup-view.js#L24](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/pickup-view.js#L24) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
- `result` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
18
api-doc/slot-machine/present-feature-trigger/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 8,
|
||||
"label": "Present Feature Trigger",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Present Feature Trigger",
|
||||
"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",
|
||||
"trigger"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Present Feature Trigger Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
* [_start](#_start) Initialize some logic which need to be called the game enters the Bet State.
|
||||
* [_registerEvent](#_registerevent) Register events.
|
||||
* [onPresentFeatureTriggerCompleted](#onpresentfeaturetriggercompleted) Start feature game.
|
||||
* [startFeatureGame](#startfeaturegame) Check the feature game condition and start base on it.
|
||||
|
||||
## Details
|
||||
|
||||
#### _start
|
||||
> Initialize some logic which need to be called the game enters the Bet State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L16)|
|
||||
|
||||
#### _registerevent
|
||||
> Register events.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L23)|
|
||||
|
||||
#### onPresentFeatureTriggerCompleted
|
||||
> Start feature game.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L29)|
|
||||
|
||||
#### startFeatureGame
|
||||
> Check the feature game condition and start base on it.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-trigger-controller.js:37](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-feature-trigger-controller.js#L37)|
|
@ -0,0 +1,46 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Present Feature Trigger Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [featureData](#featuredata) `WinlineData` The current feature trigger data.
|
||||
|
||||
### Methods
|
||||
* [Reset](#reset) Reset the feature trigger data.
|
||||
* [SetFeatureTriggerData](#setfeaturetriggerdata) Set the feature trigger data.
|
||||
* [GetFeatureTriggerData](#getfeaturetriggerdata) Get the feature trigger data.
|
||||
|
||||
## Details
|
||||
|
||||
#### featureData
|
||||
> Current point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L10)|
|
||||
|
||||
#### Reset
|
||||
> Reset the feature trigger data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L15)|
|
||||
|
||||
#### SetFeatureTriggerData
|
||||
> Set the feature trigger data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L21)|
|
||||
|
||||
#### GetFeatureTriggerData
|
||||
> Get the feature trigger data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-trigger-model.js:27](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-feature-trigger-model.js#L27)|
|
@ -0,0 +1,5 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Present Feature Trigger View
|
18
api-doc/slot-machine/present-feature-win/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 9,
|
||||
"label": "Present Feature Win",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Present Feature Win",
|
||||
"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",
|
||||
"present-feature-win"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,60 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
# Present Feature Win Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [_start](#_start) Initializes feature win state and notifies the game controller.
|
||||
- [_complete](#_complete) Resets the model state after feature is done.
|
||||
- [getFeatureWinData](#getfeaturewindata) Retrieves a structured object describing current feature win state.
|
||||
- [onViewPresentFeatureWinCompleted](#onviewpresentfeaturewincompleted) Handles the event when the view finishes win presentation. Triggers bonus, freespin, or round end logic accordingly.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### _start
|
||||
|
||||
Initializes feature win state and notifies the game controller.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L17) |
|
||||
|
||||
---
|
||||
|
||||
#### _complete
|
||||
|
||||
Resets the model state after feature is done.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L28](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L28) |
|
||||
|
||||
---
|
||||
|
||||
#### getFeatureWinData
|
||||
|
||||
Retrieves a structured object describing current feature win state
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Object |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L34) |
|
||||
|
||||
---
|
||||
|
||||
#### onViewPresentFeatureWinCompleted
|
||||
|
||||
Handles the event when the view finishes win presentation. Triggers bonus, freespin, or round end logic accordingly.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-feature-win-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/present-feature-win-controller.js#L47) |
|
||||
|
||||
---
|
@ -0,0 +1,181 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
# Present Feature Win Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
- [featureHitRule](#featurehitrule) `String` Rule that determines how the feature is triggered.
|
||||
- [featurePlayedCount](#featureplayedcount) `Number` Number of times the feature has been played.
|
||||
- [gameWinPoint](#gamewinpoint) `Number` Points won in the base game.
|
||||
- [featureWinPoint](#featurewinpoint) `Number` Points won in the feature game.
|
||||
|
||||
### Methods
|
||||
|
||||
- [Reset](#reset) Resets all model properties to default values.
|
||||
- [SetFeaturePlayedCount](#setfeatureplayedcount) Sets the number of times the feature has been played.
|
||||
- [GetFeaturePlayedCount](#getfeatureplayedcount) Gets the number of times the feature has been played.
|
||||
- [SetFeatureHitRule](#setfeaturehitrule) Sets the rule used to trigger the feature.
|
||||
- [GetFeatureHitRule](#getfeaturehitrule) Gets the feature hit rule.
|
||||
- [SetGameWinPoint](#setgamewinpoint) Sets the number of points won in the base game.
|
||||
- [GetGameWinPoint](#getgamewinpoint) Gets the number of points won in the base game.
|
||||
- [SetFeatureWinPoint](#setfeaturewinpoint) Sets the number of points won in the feature game.
|
||||
- [GetFeatureWinPoint](#getfeaturewinpoint) Gets the number of points won in the feature game.
|
||||
- [GetTotalWinPoint](#gettotalwinpoint) Gets the total number of points won (game + feature).
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### featureHitRule
|
||||
|
||||
> Rule that determines how the feature is triggered.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | String |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L7](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L7) |
|
||||
|
||||
---
|
||||
|
||||
#### featurePlayedCount
|
||||
|
||||
> Number of times the feature has been played.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L8](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L8) |
|
||||
|
||||
---
|
||||
|
||||
#### gameWinPoint
|
||||
|
||||
> Points won in the base game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L9) |
|
||||
|
||||
---
|
||||
|
||||
#### featureWinPoint
|
||||
|
||||
> Points won in the feature game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L10) |
|
||||
|
||||
---
|
||||
|
||||
### Methods
|
||||
|
||||
#### Reset
|
||||
|
||||
Resets all model properties to default values.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L16) |
|
||||
|
||||
---
|
||||
|
||||
#### SetFeaturePlayedCount
|
||||
|
||||
Sets the number of times the feature has been played.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L25](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L25) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFeaturePlayedCount
|
||||
|
||||
Gets the number of times the feature has been played.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L31](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L31) |
|
||||
|
||||
---
|
||||
|
||||
#### SetFeatureHitRule
|
||||
|
||||
Sets the rule used to trigger the feature.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L35](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L35) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFeatureHitRule
|
||||
|
||||
Gets the feature hit rule.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | String |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#41) |
|
||||
|
||||
---
|
||||
|
||||
#### SetGameWinPoint
|
||||
|
||||
Sets the number of points won in the base game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L45](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L45) |
|
||||
|
||||
---
|
||||
|
||||
#### GetGameWinPoint
|
||||
|
||||
Gets the number of points won in the base game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L51](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L51) |
|
||||
|
||||
---
|
||||
|
||||
#### SetFeatureWinPoint
|
||||
|
||||
Sets the number of points won in the feature game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L55](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L55) |
|
||||
|
||||
---
|
||||
|
||||
#### GetFeatureWinPoint
|
||||
|
||||
Gets the number of points won in the feature game.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L61) |
|
||||
|
||||
---
|
||||
|
||||
#### GetTotalWinPoint
|
||||
|
||||
Gets the total number of points won (game + feature).
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | Number |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-feature-win-model.js#L65](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/present-feature-win-model.js#L65) |
|
@ -0,0 +1,24 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
# Present Feature Win View
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
- [PresentComplete](#presentcomplete) Triggers the `PresentFeatureWinCompleted` event.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### PresentComplete
|
||||
|
||||
Triggers the `PresentFeatureWinCompleted` event which signals that the feature win presentation has completed.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-feature-win-view.js#L13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/present-feature-win-view.js#L13) |
|
18
api-doc/slot-machine/present-win/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 7,
|
||||
"label": "Present Win",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Present Win",
|
||||
"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",
|
||||
"presentwin"
|
||||
]
|
||||
}
|
||||
}
|
131
api-doc/slot-machine/present-win/present-win-controller.md
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Present Win Controller
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
* [_registerEvent](#_registerevent) Register events.
|
||||
* [_start](#_start) Initialize some logic which need to be called the game enters the Present Win State.
|
||||
* [reset](#reset) Reset the current win presentation data.
|
||||
* [getAllWinsData](#onreplayhistoryclient) Get the all wins data.
|
||||
* [presentWin](#onresume) Start the current win presentation.
|
||||
* [transitionToNextState](#isresumeend) Check the condition and move to the next state.
|
||||
* [presentPoint](#ondeposit) Start the current win point presentation.
|
||||
* [getSequencePresentWin](#onconnected) Process the current win data and return a sequence of present wins.
|
||||
* [startSequencePresentWin](#onstartgame) Start the sequence of present wins.
|
||||
* [calculateDurationPresentAllWins](#oncollectdatareceived) Calculate the duration of present wins.
|
||||
* [onPresentSpecialWinTriggered](#onbalancedatareceived) Start the special win.
|
||||
* [onPresentSpecialWinCompleted](#onbalancechangerateclicked) Stop the special win.
|
||||
* [onPresentWinPointCompleted](#updatebalance) Stop the current win point presentation.
|
||||
* [onPresentWinTurboCompleted](#notifyblance) Notify the client balance.
|
||||
* [allowLoopPresentation](#placebet) Indicates whether the sequence of present wins.
|
||||
|
||||
## Details
|
||||
|
||||
#### _registerevent
|
||||
> Register events.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L32)|
|
||||
|
||||
#### _start
|
||||
> Initialize some logic which need to be called the game enters the Bet State.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:41](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L41)|
|
||||
|
||||
#### reset
|
||||
> Reset the current win presentation data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:53](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L53)|
|
||||
|
||||
#### getAllWinsData
|
||||
> Get the all wins data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:64](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L64)|
|
||||
|
||||
#### presentWin
|
||||
> Start the current win presentation.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:82](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L82)|
|
||||
|
||||
#### transitionToNextState
|
||||
> Check the condition and move to the next state.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:91](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L91)|
|
||||
|
||||
#### presentPoint
|
||||
> Start the current win point presentation.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:125](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L125)|
|
||||
|
||||
#### getSequencePresentWin
|
||||
> Process the current win data and return a sequence of present wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:137](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L137)|
|
||||
|
||||
#### startSequencePresentWin
|
||||
> Start the sequence of present wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:168](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L168)|
|
||||
|
||||
#### calculateDurationPresentAllWins
|
||||
> Calculate the duration of present wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:216](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L216)|
|
||||
|
||||
#### onPresentSpecialWinTriggered
|
||||
> Start the special win.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:228](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L228)|
|
||||
|
||||
#### onPresentSpecialWinTriggered
|
||||
> Stop the special win.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:237](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L237)|
|
||||
|
||||
#### onPresentWinPointCompleted
|
||||
> Stop the current win point presentation.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:245](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L245)|
|
||||
|
||||
#### onPresentWinTurboCompleted
|
||||
> Stop the current win presentation if turbo mode is active.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:254](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L254)|
|
||||
|
||||
#### onPresentWinPointCompleted
|
||||
> Indicates whether the sequence of present wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/present-win-controller.js:264](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/controller/present-win-controller.js#L264)|
|
141
api-doc/slot-machine/present-win/present-win-model.md
Normal file
@ -0,0 +1,141 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Present Win Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [winLinesData](#winlinesdata) `WinlineData` The current win lines data.
|
||||
* [winScattersData](#winscattersdata) `WinlineData` The current scatter win data.
|
||||
* [winPoint](#winpoint) `Number` The current win point.
|
||||
* [durationPresentAllWins](#durationpresentallwins) `Number` The duration of all wins.
|
||||
* [durationPresentWinLines](#durationpresentwinlines) `Number` The duration of win lines.
|
||||
* [durationPresentWinScatters](#durationpresentwinscatters) `Number` The duration of scatter win.
|
||||
|
||||
### Methods
|
||||
* [Reset](#reset) Reset the present win data.
|
||||
* [SetWinLinesData](#setwinlinesdata) Set the current win lines data.
|
||||
* [GetWinLinesData](#getwinlinesdata) Get the current win lines data.
|
||||
* [SetWinScattersData](#setwinscattersdata) Set the current scatter win data.
|
||||
* [GetWinScattersData](#getwinscattersdata) Get the current scatter win data.
|
||||
* [SetWinPoint](#setwinpoint) Set the current win point.
|
||||
* [GetWinPoint](#getwinpoint) Get the current win point.
|
||||
* [SetDurationPresentAllWins](#setdurationpresentallwins) Set the duration of all wins.
|
||||
* [GetDurationPresentAllWins](#getdurationpresentallwins) Get the duration of all wins.
|
||||
|
||||
## Details
|
||||
|
||||
|
||||
#### winLinesData
|
||||
> The current win lines data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L11)|
|
||||
|
||||
|
||||
#### winScattersData
|
||||
> The current scatter win data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [WinlineData](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/slotty-data/response-data/win-line-data.js) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L12)|
|
||||
|
||||
#### winPoint
|
||||
> The current win point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:13](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L13)|
|
||||
|
||||
#### durationPresentAllWins
|
||||
> The duration of all wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L14)|
|
||||
|
||||
#### durationPresentWinLines
|
||||
> The duration of win lines.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L15)|
|
||||
|
||||
#### durationPresentWinScatters
|
||||
> The duration of scatter win.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L16)|
|
||||
|
||||
#### Reset
|
||||
> Reset the present win data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:21](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L21)|
|
||||
|
||||
#### SetWinLinesData
|
||||
> Set the current win lines data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L32)|
|
||||
|
||||
#### GetWinLinesData
|
||||
> Get the current win lines data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#38)|
|
||||
|
||||
#### SetWinScattersData
|
||||
> Set the current scatter win data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:42](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L42)|
|
||||
|
||||
#### GetWinScattersData
|
||||
> Get the current scatter win data.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:48](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#48)|
|
||||
|
||||
#### SetWinPoint
|
||||
> Set the current win point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:52](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L52)|
|
||||
|
||||
#### GetWinPoint
|
||||
> Get the current win point.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#58)|
|
||||
|
||||
#### SetDurationPresentAllWins
|
||||
> Set the duration of all wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:52](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#L52)|
|
||||
|
||||
#### GetDurationPresentAllWins
|
||||
> Get the duration of all wins.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/present-win-model.js:58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/model/present-win-model.js#58)|
|
87
api-doc/slot-machine/present-win/present-win-view.md
Normal file
@ -0,0 +1,87 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Present Win View
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
* [listTimer](#listtimer) `Timer` List of timer actions that have a finite duration.
|
||||
|
||||
### Methods
|
||||
|
||||
* [StartPresentWin](#startpresentwin) Called when the win presentation starts.
|
||||
* [StopPresentWin](#stoptpresentwin) Called when the win presentation has completed.
|
||||
* [GetDurationFromHitItems](#getdurationfromhititems) Get duration of the win item's animation.
|
||||
* [PresentWinTurbo](#presentwinturbo) Called when the win presentation is running in turbo mode.
|
||||
* [PresentAllWins](#presentallwins) Called when the win presentation displays all win items.
|
||||
* [PresentWinLines](#presentwinlines) Called when the win presentation displays win lines.
|
||||
* [PresentWinScatters](#presentwinscatters) Called when the win presentation displays the scatter win.
|
||||
* [clearTimer](#cleartimer) Clear the list of timer actions.
|
||||
|
||||
## Details
|
||||
|
||||
#### listTimer
|
||||
> List of timer actions that have a finite duration.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Timer](https://gitea.plp19.com/cocos-core/p4f-game-core/src/branch/develop/src/helper/timer.js#L4) |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L12)|
|
||||
|
||||
#### StartPresentWin
|
||||
> Called when the win presentation starts.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L17)|
|
||||
|
||||
#### StopPresentWin
|
||||
> Called when the win presentation has completed.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:23](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L23)|
|
||||
|
||||
#### GetDurationFromHitItems
|
||||
> Get duration of the win item's animation.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L29)|
|
||||
|
||||
#### PresentWinTurbo
|
||||
> Called when the win presentation is running in turbo mode.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:33](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L33)|
|
||||
|
||||
#### PresentAllWins
|
||||
> Called when the win presentation is running in turbo mode.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L47)|
|
||||
|
||||
#### PresentWinLines
|
||||
> Called when the win presentation displays win lines.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:61](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L61)|
|
||||
|
||||
#### PresentWinScatters
|
||||
> Called when the win presentation displays the scatter win.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:89](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L89)|
|
||||
|
||||
#### clearTimer
|
||||
> Clear the list of timer actions.<br/>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/view/present-win-view.js:117](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/branch/develop/src/view/present-win-view.js#L117)|
|
18
api-doc/slot-machine/respin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 25,
|
||||
"label": "Respin Game",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Respin 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",
|
||||
"respin game"
|
||||
]
|
||||
}
|
||||
}
|
15
api-doc/slot-machine/respin/repsin-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Respin View
|
||||
|
||||
## Overview
|
||||
|
||||
* The `RespinView` class is responsible for the presentation layer of the respin feature. It extends the core `View` component and can be customized to display visual feedback related to respins.
|
||||
|
||||
## Description:
|
||||
|
||||
* Initializes a new instance of RespinView.
|
||||
* Calls the base View constructor.
|
||||
* [p4f-slotty-core/src/view/respin-view.js#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/respin-view.js#L5) |
|
177
api-doc/slot-machine/respin/respin-controller.md
Normal file
@ -0,0 +1,177 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Respin Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [timeoutStartRespin](#timeoutstartrespin) `Object | null` Timeout handler for initiating respin.
|
||||
* [isPaused](#ispaused) `Boolean` Indicates whether the controller is paused.
|
||||
* [waiter](#waiter) `Object | null` Handles timing-related waiting.
|
||||
|
||||
### Methods
|
||||
|
||||
* [_start](#_start) Initializes respin-related values from input data.
|
||||
* [_complete](#_complete) Cleans up waiting logic and resets the model.
|
||||
* [_registerEvent](#_registerevent) Registers all necessary events for the respin controller.
|
||||
* [onRespinReady](#onrespinready) Handles respin-ready state. Triggers respin after a delay.
|
||||
* [onStartFeatureGameClicked](#onstartfeaturegameclicked) Handles logic when the feature game start is clicked.
|
||||
* [onPresentFeatureTriggerCompleted](#onpresentfeaturetriggercompleted) Handles logic after a present feature trigger finishes.
|
||||
* [onSpinEnd](#onspinend) Processes logic at the end of a spin, including retrigger check.
|
||||
* [respinEnd](#respinend) Triggers final respin result notification.
|
||||
* [onRespinDataReceived](#onrespindatareceived) Updates model state when server sends respin data.
|
||||
* [onPickupItemReceived](#onpickupitemreceived) Processes pickup-related bonus or extra respin data.
|
||||
* [respin](#respin) Core logic to trigger or end respin based on model/game state.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### timeoutStartRespin
|
||||
|
||||
> Timeout handler for initiating respin.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L15) |
|
||||
|
||||
#### isPaused
|
||||
|
||||
> Indicates whether the controller is paused.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L16) |
|
||||
|
||||
#### waiter
|
||||
|
||||
> Handles timing-related waiting.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L17) |
|
||||
|
||||
### Methods
|
||||
|
||||
#### _start
|
||||
|
||||
Initializes respin-related values from input data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L22) |
|
||||
|
||||
#### _complete
|
||||
|
||||
Cleans up waiting logic and resets the model.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L29](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L29) |
|
||||
|
||||
#### _registerEvent
|
||||
|
||||
Registers all necessary events for the respin controller.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L39](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L39) |
|
||||
|
||||
#### onRespinReady
|
||||
|
||||
Handles respin-ready state. Triggers respin after a delay.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L50) |
|
||||
|
||||
#### onStartFeatureGameClicked
|
||||
|
||||
Handles logic when the feature game start is clicked.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L59) |
|
||||
|
||||
#### onPresentFeatureTriggerCompleted
|
||||
|
||||
Handles logic after a present feature trigger finishes.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L67](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L67) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `isRetrigger` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
</p>
|
||||
|
||||
#### onSpinEnd
|
||||
|
||||
Processes logic at the end of a spin, including retrigger check.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L77) |
|
||||
|
||||
#### respinEnd
|
||||
|
||||
Triggers final respin result notification.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L92](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L92) |
|
||||
|
||||
#### onRespinDataReceived
|
||||
|
||||
Updates model state when server sends respin data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L104](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L104) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `point` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `retriggerData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
|
||||
#### onPickupItemReceived
|
||||
|
||||
Processes pickup-related bonus or extra respin data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L115](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L115) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `respinBonus` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
|
||||
#### respin
|
||||
|
||||
Core logic to trigger or end respin based on model/game state.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/respin-controller.js#L129](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/respin-controller.js#L129) |
|
179
api-doc/slot-machine/respin/respin-model.md
Normal file
@ -0,0 +1,179 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Respin Model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [respinRetriggerData](#respinretriggerdata) `Object | null` Data for respin retrigger conditions.
|
||||
* [respinLeft](#respinleft) `Number` Number of respins remaining.
|
||||
* [totalRespin](#totalrespin) `Number` Total number of respins triggered by feature logic.
|
||||
* [respinWin](#respinwin) `Number` Total win amount during respins.
|
||||
|
||||
### Methods
|
||||
|
||||
* [Reset](#reset) Resets all respin data to default values.
|
||||
* [SetRespinLeft](#setrespinleft) Sets the number of remaining respins.
|
||||
* [SetTotalRespin](#settotalrespin) Sets the total number of respins.
|
||||
* [SetRespinRetriggerData](#setrespinretriggerdata) Sets retrigger data for respins.
|
||||
* [SetRespinWin](#setrespinwin) Sets the win amount during respins.
|
||||
* [GetRespinLeft](#getrespinleft) Returns the number of remaining respins.
|
||||
* [GetRespinPlayed](#getrespinplayed) Calculates the number of played respins.
|
||||
* [GetTotalRespin](#gettotalrespin) Returns the total number of respins.
|
||||
* [GetRespinRetriggerData](#getrespinretriggerdata) Returns a clone of the retrigger data object.
|
||||
* [GetRespinWin](#getrespinwin) Returns the total win during respins.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### respinRetriggerData
|
||||
|
||||
> Data for respin retrigger conditions.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L9) |
|
||||
|
||||
#### respinLeft
|
||||
|
||||
> Number of respins remaining.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L10) |
|
||||
|
||||
#### totalRespin
|
||||
|
||||
> Total number of respins triggered by feature logic.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L11](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L11) |
|
||||
|
||||
#### respinWin
|
||||
|
||||
> Total win amount during respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L12) |
|
||||
|
||||
### Methods
|
||||
|
||||
#### Reset
|
||||
|
||||
Resets all respin data to default values.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L17) |
|
||||
|
||||
#### SetRespinLeft
|
||||
|
||||
Sets the number of remaining respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L26](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L26) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `respinLeft` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### SetTotalRespin
|
||||
|
||||
Sets the total number of respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L32) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalRespin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
|
||||
#### SetRespinRetriggerData
|
||||
|
||||
Sets retrigger data for respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L38](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L38) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `respinRetriggerData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
|
||||
#### SetRespinWin
|
||||
|
||||
Sets the win amount during respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L44](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L44) |
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `respinWin` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetRespinLeft
|
||||
|
||||
Returns the number of remaining respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L50](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L50) |
|
||||
|
||||
#### GetRespinPlayed
|
||||
|
||||
Calculates the number of played respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L56](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L56) |
|
||||
|
||||
#### GetTotalRespin
|
||||
|
||||
Returns the total number of respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L62](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L62) |
|
||||
|
||||
#### GetRespinRetriggerData
|
||||
|
||||
Returns a clone of the retrigger data object.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L58](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L58) |
|
||||
|
||||
#### GetRespinWin
|
||||
|
||||
Returns the total win during respins.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/respin-model.js#L74](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/respin-model.js#L74) |
|
18
api-doc/slot-machine/spin/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 4,
|
||||
"label": "Spin",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Spin",
|
||||
"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",
|
||||
"spin"
|
||||
]
|
||||
}
|
||||
}
|
131
api-doc/slot-machine/spin/spin-controller.md
Normal file
@ -0,0 +1,131 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Spin Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [savedBetPoint](#savedbetpoint) `Number` Current played bet.
|
||||
* [savedTotalBetPoint](#savedtotalbetpoint) `Number` Current total played bet.
|
||||
* [isPaused](#ispaused) `Boolean` Indicates if the game is currently paused, including when paused by lobby force.
|
||||
* [waiter](#waiter) `object ` Waits until not paused.
|
||||
|
||||
### Methods
|
||||
|
||||
* [_start](#_start) Starts a spin round. Prepares spin data, handles game round confirmation, and waits until the game is not paused before sending a spin request.
|
||||
* [_complete](#_complete) Completes the spin round and stops any waiting processes.
|
||||
* [onBetDataChanged](#onbetdatachanged) Updates internal bet tracking based on input data.
|
||||
* [onNextScrollDataReceived](#onnextscrolldatareceived) Updates the model with new scroll data received from the network.
|
||||
* [onStopSpinClicked](#onstopspinclicked) Notifies listeners when the stop spin button is clicked.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### savedbetpoint
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Current played bet.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L14](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L14)|
|
||||
|
||||
#### savedTotalBetPoint
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Current total played bet.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L15](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L15)|
|
||||
|
||||
#### isPaused
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Indicates if the game is currently paused, including when paused by lobby force.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean) |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L16)|
|
||||
|
||||
#### waiter
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Waits until not paused.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L17](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L17)|
|
||||
|
||||
### Methods
|
||||
|
||||
#### _start
|
||||
|
||||
Starts a spin round. Prepares spin data, handles game round confirmation, and waits until the game is not paused before sending a spin request.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L32](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L32)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
* `isFreeSpin` [Boolean](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean)
|
||||
* `freeroundsID` [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)
|
||||
</p>
|
||||
|
||||
#### _complete
|
||||
|
||||
Completes the spin round and stops any waiting processes.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L68](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L68)|
|
||||
|
||||
#### onBetDataChanged
|
||||
|
||||
> Updates internal bet tracking based on input data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L77](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L77)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
|
||||
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number).
|
||||
</p>
|
||||
|
||||
#### onNextScrollDataReceived
|
||||
|
||||
Updates the model with the new scroll data received from the network.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L83](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L83)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `data` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
||||
|
||||
#### onStopSpinClicked
|
||||
|
||||
Notifies listeners when the stop spin button is clicked.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/spin-controller.js#L89](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/spin-controller.js#L89)|
|
||||
|
114
api-doc/slot-machine/spin/spin-model.md
Normal file
@ -0,0 +1,114 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Spin model
|
||||
|
||||
## Index
|
||||
|
||||
### Properties
|
||||
|
||||
* [nextScrollData](#nextscrolldata) `Object` Stores the next scroll data
|
||||
* [betPoint](#betpoint) `Number` Stores the current bet point.
|
||||
* [totalBetPoint](#totalbetpoint) `Number` Stores the total bet point.
|
||||
|
||||
### Methods
|
||||
|
||||
* [SetBetPoint](#setbetpoint) Sets the bet point value.
|
||||
* [GetBetPoint](#getbetpoint) Gets the current bet point value.
|
||||
* [SetTotalBetPoint](#settotalbetpoint) Sets the total bet point value.
|
||||
* [GetTotalBetPoint](#gettotalbetpoint) Gets the current total bet point value.
|
||||
* [SetNextScrollData](#setnextscrolldata) Sets the next scroll data.
|
||||
|
||||
## Details
|
||||
|
||||
### Properties
|
||||
|
||||
#### nextScrollData
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the current bet point.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object) \| null |
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L9](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L9)|
|
||||
|
||||
#### betPoint
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the next scroll data.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number) |
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L10)|
|
||||
|
||||
#### totalBetPoint
|
||||
|
||||
> <p style={{ color: 'gray', fontSize: '1.0em' }}> Stores the next scroll data.</p>
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Type | [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)|
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L10](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L10)|
|
||||
|
||||
### Meethods
|
||||
|
||||
#### SetBetPoint
|
||||
|
||||
Sets the bet point value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L16)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `betPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetBetPoint
|
||||
|
||||
Gets the current bet point value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L22](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L22)|
|
||||
|
||||
#### SetTotalBetPoint
|
||||
|
||||
Stores the total bet point.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L28](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L28)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `totalBetPoint` [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)
|
||||
</p>
|
||||
|
||||
#### GetTotalBetPoint
|
||||
|
||||
Gets the current total bet point value.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Returns | [Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)|
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L34)|
|
||||
|
||||
#### SetNextScrollData
|
||||
|
||||
Sets the next scroll data.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/model/spin-model.js.js#L40](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/spin-model.js#L40)|
|
||||
|
||||
<p style={{ color: 'gray', fontSize: '1.0em' }}>
|
||||
|
||||
**Parameters**
|
||||
* `nextScrollData` [Object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
|
||||
</p>
|
15
api-doc/slot-machine/spin/spin-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Spin view
|
||||
|
||||
## Overview
|
||||
|
||||
* SpinView is a view class for the spin feature in the slot game. It extends the base View class and is intended to handle the visual representation and UI logic for spins.
|
||||
|
||||
## Description:
|
||||
* Initializes a new instance of SpinView.
|
||||
* Calls the base View constructor.
|
||||
* [p4f-game-core/src/view/spin-view.js:12](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/spin-view.js#L5)
|
||||
|
18
api-doc/slot-machine/take-and-gamble/_category_.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"position": 30,
|
||||
"label": "Take and Gamble",
|
||||
"collapsible": true,
|
||||
"collapsed": true,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Take and Gamble",
|
||||
"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",
|
||||
"take-and-gamble"
|
||||
]
|
||||
}
|
||||
}
|
@ -0,0 +1,102 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Take Or Gamble Controller
|
||||
|
||||
## Index
|
||||
|
||||
### Methods
|
||||
|
||||
* [_start](#_start) Initializes the take-or-gamble phase depending on game state.
|
||||
* [_registerEvent](#_registerevent) Registers trigger listeners for take or gamble actions.
|
||||
* [onTakeClicked](#ontakeclicked) Handles take button click.
|
||||
* [onGambleClicked](#ongambleclicked) Handles gamble button click.
|
||||
* [take](#take) Triggers the 'take' action.
|
||||
* [gamble](#gamble) Triggers the 'gamble' action.
|
||||
* [checkShowWinLimit](#checkshowwinlimit) Checks whether win limit has been reached and if skipping gamble is disabled.
|
||||
* [_complete](#_complete) Placeholder for completion handling.
|
||||
|
||||
---
|
||||
|
||||
## Details
|
||||
|
||||
### Methods
|
||||
|
||||
#### _start
|
||||
|
||||
Initializes the take-or-gamble phase depending on game state.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L16](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L16) |
|
||||
|
||||
---
|
||||
|
||||
#### _registerEvent
|
||||
|
||||
Registers trigger listeners for take or gamble actions and win-limit check.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L34](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L34) |
|
||||
|
||||
---
|
||||
|
||||
#### onTakeClicked
|
||||
|
||||
Handles take button click.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L47](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L47) |
|
||||
|
||||
---
|
||||
|
||||
#### onGambleClicked
|
||||
|
||||
Handles gamble button click.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L57](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L57) |
|
||||
|
||||
---
|
||||
|
||||
#### take
|
||||
|
||||
Triggers the 'take' action and notifies with current total win points.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L59](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L59) |
|
||||
|
||||
---
|
||||
|
||||
#### gamble
|
||||
|
||||
Triggers the 'gamble' action and notifies with current total win points.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L67](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L67) |
|
||||
|
||||
---
|
||||
|
||||
#### checkShowWinLimit
|
||||
|
||||
Checks whether win limit has been reached and if skipping gamble is disabled.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L75](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L75) |
|
||||
|
||||
---
|
||||
|
||||
#### _complete
|
||||
|
||||
Placeholder for completion handling.
|
||||
|
||||
| meta | description |
|
||||
| :--- | :---------- |
|
||||
| Defined in | [p4f-slotty-core/src/controller/take-or-gamble-controller.js#L80](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/controller/take-or-gamble-controller.js#L80) |
|
@ -0,0 +1,16 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Take Or Gamble Model
|
||||
|
||||
## Overview
|
||||
|
||||
`Take Or Gamble Model` is a model class for the "Take or Gamble" feature in the slot game. It extends the base model class and manages the logic and state for handling win events, including the decision to take winnings or gamble for more.
|
||||
|
||||
## Description
|
||||
|
||||
* Initializes a new instance of `Take Or Gamble Model`.
|
||||
* Calls the base model constructor.
|
||||
* Handles UI logic and state for the "Take or Gamble" feature.
|
||||
* [Source code reference](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/take-or-gamble-model.js#L5)
|
15
api-doc/slot-machine/take-and-gamble/take-and-gamble-view.md
Normal file
@ -0,0 +1,15 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Take Or Gamble View
|
||||
|
||||
## Overview
|
||||
|
||||
`Take Or Gamble View` is a UI component for the slot machine's spin feature. It extends the base `View` class and manages the display and user interactions related to taking winnings or gambling them.
|
||||
|
||||
## Description
|
||||
|
||||
* Constructs a new `Take Or Gamble View` instance.
|
||||
* Invokes the base `View` constructor.
|
||||
* Source: [`take-or-gamble-view.js:5`](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/take-or-gamble-view.js#L5)
|
69
docs/01-setup-the-project/01-create-the-project.md
Normal file
@ -0,0 +1,69 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Create The Project
|
||||
|
||||
The first step to start a new project.
|
||||
|
||||
When starting a new project, you'll be giving an empty repository.
|
||||
|
||||
Take the `Roma Legacy` game as an example.
|
||||
|
||||
## Clone Git repository
|
||||
|
||||
To clone this repository, run the following command:
|
||||
|
||||
```bash
|
||||
git clone https://gitea.plp19.com/cocos-eanew/coc-roma-legacy.git
|
||||
```
|
||||
|
||||
Once cloned, configure your Git user information (only needed the first time):
|
||||
|
||||
```bash
|
||||
cd coc-roma-legacy
|
||||
git config user.name "Your Git Username"
|
||||
git config user.email "Your Email"
|
||||
```
|
||||
|
||||
## Create Cocos Creator project
|
||||
|
||||
Inside `coc-roma-legacy` folder, create a `project.json` file:
|
||||
|
||||
```json title="project.json"
|
||||
{
|
||||
"engine": "cocos-creator-js",
|
||||
"packages": "packages",
|
||||
"name": "coc-roma-legacy",
|
||||
"version": "2.4.4",
|
||||
"isNew": false
|
||||
}
|
||||
```
|
||||
|
||||
Now you can open the project in `Cocos Creator`.
|
||||
|
||||
1. Launch **Cocos Dashboard**
|
||||
2. Click **Add Project**
|
||||
3. Navigate to **coc-roma-legacy** folder
|
||||
4. Click **Select Project**.
|
||||
|
||||

|
||||
|
||||
Now that the project is available in `Cocos Dashboard`, double-click on it to open.
|
||||
|
||||
`Cocos Creator` will generate the entire game structure including `.gitignore` file.
|
||||
|
||||

|
||||
|
||||
## Commit to Git
|
||||
|
||||
At this point, you should create an initial commit and open your first `Pull Request`.
|
||||
|
||||
Run these following command:
|
||||
|
||||
```bash
|
||||
git checkout -b feature/init-project
|
||||
git add --a
|
||||
git commit -m "Init cocos project"
|
||||
git push --set-upstream origin feature/init-project
|
||||
```
|
92
docs/01-setup-the-project/02-add-submodules.md
Normal file
@ -0,0 +1,92 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Add Submodules
|
||||
|
||||
Let's add more packages and templates to the project.
|
||||
|
||||
A slot game project is composed of multiple Git repositories used as [submodules](https://www.atlassian.com/git/tutorials/git-submodule).
|
||||
|
||||
It is important to understand the responsibilities of each submodule.
|
||||
|
||||
We recommend reviewing the [Slot Core Submodule documentation](../category/submodules/) before proceeding.
|
||||
|
||||
## Main submodules
|
||||
|
||||
These are submodules presented in every Slot Game project.
|
||||
|
||||
To add main submodules, run the following commands:
|
||||
|
||||
```bash
|
||||
git submodule add -f ../base-slot-template.git assets/core-assets/slotty-core
|
||||
git submodule add -f ../game-core-template.git assets/core-assets/game-core
|
||||
git submodule add -f ../hyper-slot-template.git assets/core-assets/hyper-core
|
||||
```
|
||||
|
||||
To add packages submodule, first **delete packages folder**.
|
||||
|
||||
Then run the follwing command:
|
||||
|
||||
```bash
|
||||
git submodule add -f ../hyper-editor-package.git packages
|
||||
```
|
||||
|
||||
## International Theme vs Chinese Theme
|
||||
|
||||
Depend on the theme of your game, add these commands:
|
||||
|
||||
For `International Theme`:
|
||||
|
||||
```bash
|
||||
git submodule add -f ../hyper-wintune-international.git assets/core-assets/hyper-wintune-international
|
||||
git submodule add -f ../hyper-coin-shower-international.git assets/core-assets/hyper-coin-shower-international
|
||||
git submodule add -f ../hyper-dialog-international.git assets/core-assets/hyper-dialog-international
|
||||
```
|
||||
|
||||
For `Chinese Theme`:
|
||||
|
||||
```bash
|
||||
git submodule add -f ../hyper-wintune-chinese.git assets/core-assets/hyper-wintune-chinese
|
||||
git submodule add -f ../hyper-coin-shower-chinese.git assets/core-assets/hyper-coin-shower-chinese
|
||||
git submodule add -f ../hyper-dialog-chinese.git assets/core-assets/hyper-dialog-chinese
|
||||
```
|
||||
|
||||
## Optional Submodule
|
||||
|
||||
These are submodules for specific feature including: `landing sound`, effect `win border/tension` and `hyper jackpot`.
|
||||
|
||||
Add one or more of those submodules depends on the game design.
|
||||
|
||||
```bash
|
||||
git submodule add -f ../hyper-jackpot-package.git assets/core-assets/hyper-jackpot
|
||||
git submodule add -f ../hyper-win-border-and-tension.git assets/core-assets/hyper-win-border-and-tension
|
||||
git submodule add -f ../hyper-scatter-landing-sound.git assets/core-assets/hyper-scatter-landing-sound
|
||||
```
|
||||
|
||||
## Update submodules to latest commit
|
||||
|
||||
All submodules should be on master branch and update to the latest commit.
|
||||
|
||||
To fetch the latest update, run the following command:
|
||||
|
||||
```bash
|
||||
git submodule update --init --recursive
|
||||
```
|
||||
|
||||
:::tip
|
||||
You can drop the `--init` after the first time.
|
||||
:::
|
||||
|
||||
## Commit to git
|
||||
|
||||
Now that we add all nesscessary submodule to the project, let's commit all of these change to open a Pull Request:
|
||||
|
||||
Run these following command:
|
||||
|
||||
```bash
|
||||
git checkout -b feature/add-submodules
|
||||
git add --a
|
||||
git commit -m "Add submodules"
|
||||
git push --set-upstream origin feature/add-submodules
|
||||
```
|
35
docs/01-setup-the-project/03-setup-custom-engine.md
Normal file
@ -0,0 +1,35 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Setup Custom Cocos Engine
|
||||
|
||||
Set **Javascript Engine Path** to a **custom Cocos Engine**.
|
||||
|
||||
Thanks to the open source nature of Cocos Creator, we are able to customize some of the function in the source code to meet the requirement for Hyper Slot Game.
|
||||
|
||||
For the detail of the Custom Engine, take a look at this [**Custom Cocos Engine documentation**](../category/custom-cocos-engine)
|
||||
|
||||
**Clone the repository**
|
||||
|
||||
This custom engine can be universally used for all Hyper Slot Game project. So you only have to do this step once.
|
||||
|
||||
Choose your working directory and clone this repo using the following command:
|
||||
|
||||
```bash
|
||||
git clone https://gitea.plp19.com/cocos-core/cocos-creator-engine.git
|
||||
```
|
||||
|
||||
**Set custom engine in Cocos Creator**
|
||||
|
||||
Open the project in Cocos Creator.
|
||||
|
||||
From the main menu, choose `Projects` -> `Project Settings`
|
||||
|
||||

|
||||
|
||||
Click on the `Custom Engine` tab, set `Javascript Engine Path` to the `cocos-creator-engine` folder.
|
||||
|
||||
Click `Save` and restart Cocos Creator.
|
||||
|
||||

|
52
docs/01-setup-the-project/04-create-game-folder-structure.md
Normal file
@ -0,0 +1,52 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Create Game Folder Structure
|
||||
|
||||
Make a folder structure for all the game assets.
|
||||
|
||||
Inside the `assets` folder, we already have a `core-assets` folder which contains all assets of the template submodule.
|
||||
|
||||
We need to have a `game-assets` folder to contain the assets for our game.
|
||||
|
||||
Create the following folder structure:
|
||||
|
||||

|
||||
|
||||
Next we're gonna use our first template assets - the template cocos scenes.
|
||||
|
||||
These scenes are already setup and ready to use.
|
||||
|
||||
Copy all Cocos scene assets from `assets/core-assets/hyper-core/scenes` to ` assets/game-assets/scenes`.
|
||||
|
||||
Rename those scenes:
|
||||
- `template-loading` -> `loading`
|
||||
- `template-main-game` -> `main-game`
|
||||
- `template-preload` -> `preload`
|
||||
- `template-preview` -> `preview`
|
||||
|
||||

|
||||
|
||||
Inside `assets/game-assets/scripts/`, create a folder called `custom-scaler` then add a script `custom-scale-data.js`.
|
||||
|
||||

|
||||
|
||||
The setup is complete. You should create a commit and open Pull Request.
|
||||
|
||||
Run these following command:
|
||||
|
||||
```bash
|
||||
git checkout -b feature/setup-folder-structure
|
||||
git add --a
|
||||
git commit -m "Setup Folder Structure"
|
||||
git push --set-upstream origin feature/setup-folder-structure
|
||||
```
|
||||
|
||||
:::warning
|
||||
Notice that you can only commit `game-asset`, `scripts` and `scenes`.
|
||||
|
||||
Git automatically ignores empty folders, so don't be alarmed if they don't appear in your commits.
|
||||
|
||||
No worries—these folders will soon be filled with plenty of assets!
|
||||
:::
|
17
docs/01-setup-the-project/_category_.json
Normal file
@ -0,0 +1,17 @@
|
||||
{
|
||||
"position": 1,
|
||||
"label": "Setup The Project",
|
||||
"collapsible": true,
|
||||
"collapsed": false,
|
||||
"link": {
|
||||
"type": "generated-index",
|
||||
"title": "Start a new project",
|
||||
"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": [
|
||||
"setup",
|
||||
"project",
|
||||
"repository",
|
||||
"development environment"
|
||||
]
|
||||
}
|
||||
}
|
BIN
docs/01-setup-the-project/img/cocos-dashboard.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
docs/01-setup-the-project/img/cocos-folder-structure.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
docs/01-setup-the-project/img/custom-scale.png
Normal file
After Width: | Height: | Size: 27 KiB |
BIN
docs/01-setup-the-project/img/game-assets.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/01-setup-the-project/img/project-setting.png
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
docs/01-setup-the-project/img/set-custom-engine.png
Normal file
After Width: | Height: | Size: 29 KiB |
BIN
docs/01-setup-the-project/img/template-scenes.png
Normal file
After Width: | Height: | Size: 85 KiB |
178
docs/02-setup-main-game/01-game-config.md
Normal file
@ -0,0 +1,178 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# Game Configuration
|
||||
|
||||
The initial configuration requirements from the Slot Core.
|
||||
|
||||
---
|
||||
|
||||
While the core logic is responsible for calculations and maintaining the game state, it's the client's responsibility to define all game-specific information.
|
||||
|
||||
Let’s go step-by-step to define these elements.
|
||||
|
||||
## Slot Items
|
||||
|
||||
Each game features specific slot items displayed on the reel panel. By default, the Slot Core includes only two items: **Wild** and **Scatter**.
|
||||
|
||||
For `Roma Legacy`, there are 8 slot items total, including **Wild**.
|
||||
|
||||

|
||||
|
||||
To define the 7 additional items for this game, create the following script:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/slotty-item.js"
|
||||
var SlottyItem = p4fslot.require('slotty-item');
|
||||
var Enum = p4fslot.require('extendable-enum');
|
||||
|
||||
Enum.InitEnum(SlottyItem, [
|
||||
'Pic1',
|
||||
'Pic2',
|
||||
'Pic3',
|
||||
'Pic4',
|
||||
'Pic5',
|
||||
'Pic6',
|
||||
'Pic7',
|
||||
'Bonus'
|
||||
]);
|
||||
|
||||
module.exports = SlottyItem;
|
||||
```
|
||||
|
||||
**Note**: Item names are defined using the texture asset names, not the symbol names received from the server response.
|
||||
|
||||
|Asset's name | Server Response |
|
||||
|-------------|-----------------|
|
||||
| Pic1 | PIC1 |
|
||||
| Pic2 | PIC2 |
|
||||
| Pic3 | PIC3 |
|
||||
| Pic4 | PIC4 |
|
||||
| Pic5 | PIC5 |
|
||||
| Pic6 | PIC6 |
|
||||
| Pic7 | PIC7 |
|
||||
| Bonus | BONUS |
|
||||
|
||||
For example, if the server returns a symbol named **BONUS**, the game should display the **Bonus** asset.
|
||||
|
||||
To establish this mapping, use the following configuration script:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/configs/extend-hyper-gaming-config.js"
|
||||
var HyperGamingConfig = require('hyper-gaming-config');
|
||||
var SlottyItem = require('slotty-item');
|
||||
|
||||
HyperGamingConfig.itemMapper['BONUS'] = SlottyItem.Bonus;
|
||||
HyperGamingConfig.itemMapper['PIC1'] = SlottyItem.Pic1;
|
||||
HyperGamingConfig.itemMapper['PIC2'] = SlottyItem.Pic2;
|
||||
HyperGamingConfig.itemMapper['PIC3'] = SlottyItem.Pic3;
|
||||
HyperGamingConfig.itemMapper['PIC4'] = SlottyItem.Pic4;
|
||||
HyperGamingConfig.itemMapper['PIC5'] = SlottyItem.Pic5;
|
||||
HyperGamingConfig.itemMapper['PIC6'] = SlottyItem.Pic6;
|
||||
HyperGamingConfig.itemMapper['PIC7'] = SlottyItem.Pic7;
|
||||
```
|
||||
|
||||
## Slot Setting
|
||||
|
||||
There are two settings that determine the betting method used in the game:
|
||||
|
||||
- **TypeBetConfig**: this defines the bet calculation method. The available options are:
|
||||
- Way
|
||||
- Line
|
||||
- BetOptions
|
||||
- Dynaways
|
||||
- **TypePayline**: this setting determines which text label is displayed in the game's UI. Each type corresponds to a different label:
|
||||
| Type | Text Message |
|
||||
|---------|----------------|
|
||||
|Way | BET PER WAY |
|
||||
|Line | BET PER LINE |
|
||||
|BaseBet | PLAY MULTIPLIER|
|
||||
|
||||
Depending on the requirements of your game, you can customize both Payline and BetConfig by adding the following script:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
var BaseSlottySetting = p4fslot.require('slotty-setting');
|
||||
var SlottyItem = require('slotty-item');
|
||||
var SlottyParameter = p4fslot.require('slotty-parameter');
|
||||
|
||||
BaseSlottySetting.prototype._getDefaultTypePayline = function () {
|
||||
return SlottyParameter.TypePayline.Line;
|
||||
};
|
||||
|
||||
BaseSlottySetting.prototype._getDefaultTypeBetConfig = function () {
|
||||
return SlottyParameter.TypeBetConfig.Line;
|
||||
}
|
||||
```
|
||||
|
||||
## Default Slot Item Pattern
|
||||
|
||||
When the game is opened, the reel panel should display a **default pattern** that contains no possible win lines.
|
||||
|
||||
For instance, the following item pattern should not be used, as it contains two win lines:
|
||||
|
||||

|
||||
|
||||
To keep the gameplay experience fresh, the displayed pattern should be selected randomly each time. At a minimum, three non-winning patterns should be available.
|
||||
|
||||
To configure these patterns, add the following method to your **extend-slotty-setting** script:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
BaseSlottySetting.prototype._getPatternNotWin = function () {
|
||||
return [
|
||||
[SlottyItem.Pic5, SlottyItem.Pic3, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
|
||||
SlottyItem.Bonus, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic1, SlottyItem.Pic5,
|
||||
SlottyItem.Pic2, SlottyItem.Pic6, SlottyItem.Pic2, SlottyItem.Pic1, SlottyItem.Pic2
|
||||
],
|
||||
[SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic2, SlottyItem.Pic5, SlottyItem.Pic7,
|
||||
SlottyItem.Pic4, SlottyItem.Pic7, SlottyItem.Pic6, SlottyItem.Pic5, SlottyItem.Pic7,
|
||||
SlottyItem.Pic7, SlottyItem.Pic3, SlottyItem.Bonus, SlottyItem.Pic2, SlottyItem.Pic3
|
||||
],
|
||||
[SlottyItem.Pic1, SlottyItem.Pic2, SlottyItem.Pic3, SlottyItem.Pic7, SlottyItem.Pic3,
|
||||
SlottyItem.Pic2, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Pic2,
|
||||
SlottyItem.Pic1, SlottyItem.Pic7, SlottyItem.Pic4, SlottyItem.Pic3, SlottyItem.Bonus
|
||||
]
|
||||
];
|
||||
};
|
||||
```
|
||||
|
||||
The results of those 3 patterns are shown below:
|
||||
|
||||
| Pattern 1 | Pattern 2 | Pattern 3 |
|
||||
|---------------------------------|---------------------------------|---------------------------------|
|
||||
||||
|
||||
|
||||
## Hyper Gaming Integration
|
||||
|
||||
The Slot Core supports both SmartFox and Hyper Gaming connections. For Hyper Gaming, we integrate specific modules using the DIContainer.
|
||||
|
||||
To connect and interact with the Hyper Gaming server, we need to register two key modules:
|
||||
- **hyper-gaming-config**: manages the connection configuration for the Hyper Gaming server.
|
||||
- **hyper-gaming-server-handler**: handles request and response data for game-server communication.
|
||||
|
||||
To register these, add the `_registerInjection` function in `extend-slotty-setting.js`:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
var DIContainer = p4fcore.require('di-container');
|
||||
|
||||
BaseSlottySetting.prototype._registerInjection = function () {
|
||||
DIContainer.Register('serverConfig', require('hyper-gaming-config'));
|
||||
DIContainer.Register('serverHandler', p4fslot.require('hyper-gaming-server-handler'));
|
||||
};
|
||||
```
|
||||
|
||||
In addition to server modules, all Hyper Gaming projects should initialize the following handlers for sound, hotkey and UI interaction.
|
||||
|
||||
In the same `extend-slotty-setting.js`, add this function:
|
||||
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
var HyperSoundHandler = require('sound-handler');
|
||||
var UISoundHandler = require('ui-sound-handler');
|
||||
var HyperHotkeyHandler = require('hyper-hotkey-handler');
|
||||
var HyperNotificationHandler = require('hyper-notification-handler');
|
||||
|
||||
BaseSlottySetting.prototype._initializeParameter = function () {
|
||||
new UISoundHandler();
|
||||
new HyperSoundHandler();
|
||||
new HyperHotkeyHandler();
|
||||
new HyperNotificationHandler();
|
||||
};
|
||||
```
|
29
docs/02-setup-main-game/02-preview-scene.md
Normal file
@ -0,0 +1,29 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Preview Scene
|
||||
|
||||
Local login configuration.
|
||||
|
||||
---
|
||||
|
||||
The login simulator scene allows you to run the game using a session account during development, enabling easier testing and debugging.
|
||||
|
||||
This scene includes a `login-hyper-gaming` object used to establish a connection with a running environment of your choice.
|
||||
|
||||

|
||||
|
||||
Available environments:
|
||||
|
||||
- **DEMO** : similar to [https://gaming-world.joker88.club]( https://gaming-world.joker88.club/). This environment uses a demo account, so no login is required. Some features are disabled, but the outcome feature is enabled, allowing you to select specific outcomes for testing purposes.
|
||||
- **SAT** : similar to [http://fns.joker88.club](http://fns.joker88.club/). This environment requires a valid account to log in. Except for the outcome feature, all other features are enabled, including replay and resume functionality.
|
||||
- **LOCAL** : Use this only if other environments are unavailable. By manually setting up session data, you can run the game locally. Not recommended for regular use.
|
||||
|
||||
To use preview scene, simply choose an Enviroment and put in the Game ID, then save the scene.
|
||||
|
||||
:::tip
|
||||
You should set the preview scene as a start scene in `Project Setting`. With that, no matter which scene your are on, when the game starts, it will always load preview scene first.
|
||||
|
||||

|
||||
:::
|
68
docs/02-setup-main-game/03-preload-scene.md
Normal file
@ -0,0 +1,68 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Preload Scene
|
||||
|
||||
Setup configuration for asset loading.
|
||||
|
||||
---
|
||||
|
||||
The Preload Scene is where you define which assets will be downloaded **before** and **after** the game starts.
|
||||
|
||||
Setting up the preload system involves several steps, depending on the types of assets and specific download requirements.
|
||||
|
||||
Check out the [Game Assets Structure](../category/game-asset-structure) for more detail.
|
||||
|
||||
## Preload vs Postload
|
||||
|
||||
Hyper Slot Game uses a two-stage loading process:
|
||||
- **Preload**: Downloads essential assets before the game scene is displayed. These typically include the background, text elements, and static textures.
|
||||
- **Postload**: Downloads additional assets in the background after the scene has been loaded. This usually includes animations. While these assets are downloading, static frame texture are shown in place of the actual animations. Once the download is complete, the animations seamlessly replace the static frame.
|
||||
|
||||
| Preload | Postload |
|
||||
|--------------------------------------|---------------------------------|
|
||||
|  |  |
|
||||
|
||||
Preload and postload assets are organized by scene.
|
||||
|
||||
For example, before loading the **Main Scene**, its preload assets are downloaded first. After the scene is displayed, the postload assets begin downloading in the background.
|
||||
|
||||
The same process applies to other scenes such as **Gamble**, **Free Game**, and **Bonus**.
|
||||
|
||||
## Platform Assets
|
||||
|
||||
Hyper Slot Game runs on both Web Desktop and Web Mobile platforms. While the UI and textures appear visually similar across both, the actual assets differ due to platform-specific optimization requirements.
|
||||
|
||||
Typically, the mobile version uses smaller-sized texture assets to reduce memory usage and improve performance.
|
||||
|
||||
| Assets | Desktop Size | Mobile Size |
|
||||
|-----------------------|---------------|--------------|
|
||||
| Symbol Bonus Animation| 1024x2048 | 1024x1024 |
|
||||
| Bigwin Spine Animation| 512x1024 | 358x717 |
|
||||
|
||||
As a result, when the game detects a mobile device, it will automatically download a different set of optimized assets tailored for that platform.
|
||||
|
||||
## Localize Assets
|
||||
|
||||
Hyper Slot Game supports localization through both text and raw asset replacements, with English as the default language.
|
||||
|
||||
Based on the selected language configuration, the game will download the corresponding localized assets instead of the default English versions.
|
||||
|
||||
| Assets | EN | ZH | TH |
|
||||
|---------------|-----------------------------------------|---------------------------------------------|---------------------------------------------|
|
||||
|Text Buy Bonus||||
|
||||
|
||||
## Setting Up the Preload Scene
|
||||
|
||||

|
||||
|
||||
To set up the Preload Scene, simply open the scene and run the **preload-hyper** command from the **P4F Editor** package.
|
||||
|
||||
The available commands are:
|
||||
- **Load Message**: Scans the working directory for any text message files and loads them into the `game-message` component.
|
||||
- **Load Localize**: Detects all available language options and loads the corresponding localized assets into the `localization` component.
|
||||
- **Load Preload Assets**: Defines preload and postload assets, then loads them into the `p4f-scene-manager` component of the `scene-manager` node.
|
||||
- **Load Assets By Platform**: Scans for mobile-specific assets (used when the game runs on mobile devices) and loads them into the `platform-asset-manager` component.
|
||||
- **Load Sound**: Scans for background music and sound effects (SFX) and loads them into the `sound-controller`.
|
||||
- **Load All Above**: Executes all of the above commands in sequence.
|
59
docs/02-setup-main-game/04-loading-scene.md
Normal file
@ -0,0 +1,59 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Loading Scene
|
||||
|
||||
Generate asset loading scene layout.
|
||||
|
||||
---
|
||||
|
||||
This is where the actual preload asset downloading begins, accompanied by a progress bar to indicate loading status.
|
||||
|
||||
In addition to loading assets, Hyper Slot Game also uses this scene to showcase the game’s main features through in-game advertisements.
|
||||
|
||||

|
||||
|
||||
## Loading Hyper vs New Loading Hyper
|
||||
|
||||
In Hyper Slot games, there are 2 styles of loading scene:
|
||||
|
||||
- **loading-hyper**: The default loading setup. Displays all advertising features on a single screen, with an option to automatically launch the game once all preload assets are downloaded.
|
||||
- **new-hyper-loading**: A newer loading style that presents advertising features in a paginated layout. This version does not include an option to start the game automatically.
|
||||
|
||||
| loading-hyper | new-loading-hyper |
|
||||
|-------------------------------------------------------|-----------------------------------------------------------------|
|
||||
|||
|
||||
|
||||
## Setup loading scene
|
||||
|
||||
To set up the loading scene, use the appropriate command from the `P4F Editor` package: `loading-hyper` or `new-loading-hyper`, depending on your requirements.
|
||||
|
||||
 
|
||||
|
||||
Running either command will generate a complete loading scene, including both landscape and portrait layouts.
|
||||
|
||||
Once the scene is generated, you can customize it by positioning UI elements and assigning the appropriate assets.
|
||||
|
||||

|
||||
|
||||
One of the best features of these commands is that they can also automatically load all required assets for the loading scene.
|
||||
|
||||
If you run the command without setting up the assets, you’ll see an empty loading scene like this:
|
||||
|
||||

|
||||
|
||||
However, with a proper asset setup, the loading scene will appear fully populated, like this:
|
||||
|
||||

|
||||
|
||||
:::info
|
||||
For detailed guidelines on how to set up loading assets, refer to the [Game Asset Structure](../category/game-asset-structure) manual.
|
||||
:::
|
||||
|
||||
:::tip
|
||||
For testing purposes, you don’t need a full asset setup. \
|
||||
Just set up the ***btn-start*** node in the Node Tree and you’re good to go.
|
||||
|
||||

|
||||
:::
|
26
docs/02-setup-main-game/05-main-scene/01-system.md
Normal file
@ -0,0 +1,26 @@
|
||||
---
|
||||
sidebar_position: 1
|
||||
---
|
||||
|
||||
# System Setup
|
||||
|
||||
## Overview
|
||||
The **System** module provides global access to sprite frames and animation assets, enabling efficient resource management across the game.
|
||||
|
||||
## Sprite Frame Provider
|
||||
The **SpriteFrameProvider** allows global access to sprite frames from anywhere in the codebase.
|
||||
|
||||

|
||||
|
||||
**Setup Steps:**
|
||||
1. Configure the **SpriteFrameProvider** to register sprite assets.
|
||||
2. Ensure all sprite frames are added to the provider for global access.
|
||||
|
||||
## Animation Provider
|
||||
The **Animation Provider** manages and exposes game-related animation assets globally.
|
||||
|
||||

|
||||
|
||||
**Setup Steps:**
|
||||
1. Register animation assets in the **Animation Provider**.
|
||||
2. Verify that animations are correctly linked to their respective prefabs.
|
51
docs/02-setup-main-game/05-main-scene/02-background.md
Normal file
@ -0,0 +1,51 @@
|
||||
---
|
||||
sidebar_position: 2
|
||||
---
|
||||
|
||||
# Background Setup
|
||||
|
||||
## Overview
|
||||
The background serves as the visual scenery behind gameplay elements, supporting both **Landscape** (Desktop and Mobile) and **Portrait** (Mobile only) orientations.
|
||||
|
||||
| Orientation | Desktop | Mobile |
|
||||
|-------------|---------|--------|
|
||||
| **Landscape** |  |  |
|
||||
| **Portrait** |  |  |
|
||||
|
||||
## Asset Preparation
|
||||
| Type | Assets | Description |
|
||||
|------|--------|-------------|
|
||||
| **Static** |  | Required for all games. |
|
||||
| **Animation** |  | Optional, depending on game design. |
|
||||
|
||||
## Setup Steps
|
||||
1. **Landscape Background**:
|
||||
- Use the prepared sprite frame for the landscape background.
|
||||
- 
|
||||
|
||||
2. **Portrait Background**:
|
||||
- Use the prepared sprite frame for the mobile portrait background.
|
||||
- 
|
||||
|
||||
3. **Animated Background** (if applicable):
|
||||
- **Step 1**: Use the helper tool to generate animations from prepared assets.
|
||||
- 
|
||||
- 
|
||||
- **Step 2**: Configure spine animation settings:
|
||||
- Enable **Is Loop** to ensure continuous playback.
|
||||
- Set a **Static Sprite Frame** for display before the animation loads.
|
||||
- 
|
||||
- 
|
||||
- **Step 3**: Add animation nodes:
|
||||
- **Landscape**:
|
||||
- Create an `Empty Node` named `anim-background-main-game`.
|
||||
- Add the `animation-play-on-enable` component with the animation name from the **Animation Provider**.
|
||||
- Add the `background-scaler` component to resize based on screen resolution.
|
||||
- 
|
||||
- **Portrait**:
|
||||
- Create an `Empty Node` named `mobile-background-anim-portrait`.
|
||||
- Add the `mobile-portrait-background-ui-controller` and `orientation-ui-controller` components for mobile portrait display.
|
||||
- Create a child `Empty Node` named `anim-background-main-game`.
|
||||
- Add the `animation-play-on-enable` and `portrait-anim-background-scaler` components.
|
||||
- 
|
||||
- 
|
43
docs/02-setup-main-game/05-main-scene/03-reel-slot.md
Normal file
@ -0,0 +1,43 @@
|
||||
---
|
||||
sidebar_position: 3
|
||||
---
|
||||
|
||||
# Reel Slot Setup
|
||||
|
||||
## Overview
|
||||
The reel slot system manages the core spinning mechanics of the game.
|
||||
|
||||
## Asset Preparation
|
||||
- Add symbol textures and reel frames:
|
||||
- 
|
||||
- 
|
||||
|
||||
## Sprite Frame Provider
|
||||
- Add symbols to the **SpriteFrameProvider** for global access.
|
||||
- 
|
||||
|
||||
## Reel Frame
|
||||
- Configure the reel frame:
|
||||
- 
|
||||
- 
|
||||
|
||||
## Configuration
|
||||
Use the `reel-scroller-helper` to set up spinning behavior:
|
||||
|
||||

|
||||
|
||||
| Property | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| **Cell Item Script Name** | Script attached to each cell item. |  |
|
||||
| **Scroller Script Name** | Script handling spinning logic. |  |
|
||||
| **Row Count x Reel Count** | Number of slot items per row and column. |  |
|
||||
| **Cell Size** | Size of each cell. |  |
|
||||
| **Cell Spacing** | Horizontal and vertical distance between cells. | - |
|
||||
| **Cell Dim Color** | Dark color for non-winning cells during win animations. |  |
|
||||
| **Top Count and Bot Count** | Additional cells at the top and bottom for spinning logic. |  |
|
||||
|
||||
## Generate Reel Panel
|
||||
- Use the `reel-scroller-helper` to auto-generate the reel panel.
|
||||
- 
|
||||
|
||||
**Tip**: Temporarily disable any popups covering the scene to view and edit reel slot components clearly.
|
37
docs/02-setup-main-game/05-main-scene/04-spinning-panel.md
Normal file
@ -0,0 +1,37 @@
|
||||
---
|
||||
sidebar_position: 4
|
||||
---
|
||||
|
||||
# Spinning Panel Setup
|
||||
|
||||
## Overview
|
||||
The spinning panel system includes the **reel slot panel** and additional panels: `landing-panel`, `tension-panel`, `present-win-cell-panel`, and `present-win-border-panel`.
|
||||
|
||||
## Panel Setup
|
||||
- **Landing Panel**:
|
||||
- 
|
||||
- **Script**:
|
||||
```jsx
|
||||
SlottySetting.prototype._registerInjection = function () {
|
||||
DIContainer.Register('landingGenerator', require('landing-generator'));
|
||||
};
|
||||
```
|
||||
|
||||
- **Present Win Cell Panel**:
|
||||
- 
|
||||
|
||||
- **Present Win Border Panel**:
|
||||
- 
|
||||
|
||||
- **Tension Panel**:
|
||||
- 
|
||||
- For custom size frames, set **sizeMode** to **Custom** and configure the static frame and size.
|
||||
- 
|
||||
- **Check Toggle**: Ensure the general panel toggle is correctly set.
|
||||
- 
|
||||
- **Script**:
|
||||
```jsx
|
||||
SlottySetting.prototype._registerInjection = function () {
|
||||
DIContainer.Register('tensionGenerator', require('tension-generator'));
|
||||
};
|
||||
```
|
@ -0,0 +1,41 @@
|
||||
---
|
||||
sidebar_position: 5
|
||||
---
|
||||
|
||||
# On Reel Win Point
|
||||
|
||||
## Overview
|
||||
- The **Win Point Per Line** system displays win points for each payline, including scatter wins.
|
||||
- The **All Win Point** system displays win point at center.
|
||||
|
||||
| Win Point Per Line | All Win Point |
|
||||
| ------------------ | ------------- |
|
||||
|||
|
||||
|
||||
## Asset Preparation
|
||||
|
||||
1. Locate all template prefabs: `assets/core-assets/hyper-core/packages/on-reel-present-win-point/prefab`
|
||||
2. Copy and paste them to the game assets location: `assets/game-assets/prefabs`
|
||||
|
||||

|
||||
|
||||
3. Prepare fonts
|
||||
|
||||

|
||||
|
||||
## Setup
|
||||
- Add the `on-reel-present-win-point`, `on-reel-present-all-win-point` prefab to the main scene.
|
||||
|
||||
- Set the **Label Position**, **Cell Item Size**, and **Defaut Font Size** according to the game design.
|
||||
|
||||

|
||||
|
||||
- Set the **Font** the prepared assets.
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
:::tip
|
||||
Follow game design specifications for position and size.
|
||||
:::
|
93
docs/02-setup-main-game/05-main-scene/06-special-win.md
Normal file
@ -0,0 +1,93 @@
|
||||
---
|
||||
sidebar_position: 6
|
||||
---
|
||||
|
||||
# Special Win System
|
||||
|
||||
## Overview
|
||||
Special Wins are high-value reward events categorized by payout thresholds:
|
||||
|
||||
| Win Type | Trigger Threshold | Preview |
|
||||
|----------|-------------------|---------|
|
||||
| **Big Win** | Medium payout |  |
|
||||
| **Super Win** | High payout |  |
|
||||
| **Mega Win** | Maximum payout |  |
|
||||
|
||||
## Implementation
|
||||
### Asset Preparation
|
||||
- Components:
|
||||
| Component | Purpose |
|
||||
|-----------|---------|
|
||||
| `hyper-special-win-initializer` | Initializes the system. |
|
||||
| `hyper-present-special-win` | Manages animation sequences and display logic. |
|
||||
| `hyper-special-win-label-point-effect` | Controls win amount visualization. |
|
||||
- 
|
||||
|
||||
- **Coin Effect System**:
|
||||
- Variants for different game theme:
|
||||
| Submodule | Theme | Preview |
|
||||
|-----------|-------|---------|
|
||||
| `hyper-coin-shower-international` | International |  |
|
||||
| `hyper-coin-shower-chinese` | Chinese |  |
|
||||
|
||||
- **Static Assets**:
|
||||
| Platform | Path | Preview |
|
||||
|----------|------|---------|
|
||||
| Desktop | `assets/textures/desktop/preloads/special-wins` |  |
|
||||
| Mobile | `assets/textures/mobile/preloads/special-wins` |  |
|
||||
|
||||
### Animation Setup
|
||||
1. **Animation Resources**:
|
||||
- Path:
|
||||
| Platform | Path | Preview |
|
||||
|----------|------|---------|
|
||||
| Desktop | `assets/textures/desktop/postloads/anim-special-win` |  |
|
||||
| Mobile | `assets/textures/mobile/postloads/anim-special-win` |  |
|
||||
|
||||
2. **Animation Flow**:
|
||||
```mermaid
|
||||
graph TD
|
||||
SW[Special Wins] --> BW[Big Win]
|
||||
SW --> SPW[Super Win]
|
||||
SW --> MW[Mega Win]
|
||||
|
||||
BW --> BWI[bigwin-in] --> BWL[bigwin-loop] --> BWO[bigwin-out]
|
||||
SPW --> SPWI[superwin-in] --> SPWL[superwin-loop] --> SPWO[superwin-out]
|
||||
MW --> MWI[megawin-in] --> MWL[megawin-loop] --> MWO[megawin-out]
|
||||
|
||||
classDef inStage fill:#e6f3ff,stroke:#666,color:#000
|
||||
classDef loopStage fill:#fff2cc,stroke:#666,color:#000
|
||||
classDef outStage fill:#f8cecc,stroke:#666,color:#000
|
||||
classDef winType fill:#d5e8d4,stroke:#82b366,color:#000
|
||||
classDef specialWin fill:#fff4dd,stroke:#ff0000,color:#000
|
||||
|
||||
class BWI,SPWI,MWI inStage
|
||||
class BWL,SPWL,MWL loopStage
|
||||
class BWO,SPWO,MWO outStage
|
||||
class BW,SPW,MW winType
|
||||
class SW specialWin
|
||||
linkStyle default stroke-width:2px,stroke:#ff0000
|
||||
```
|
||||
- 
|
||||
|
||||
3. **Animation Settings**:
|
||||
- Configure static fallback and loop animations:
|
||||
| Setting | Example |
|
||||
|---------|---------|
|
||||
| Static Fallback |  |
|
||||
| Loop Animation |  |
|
||||
|
||||
4. **Font Configuration**:
|
||||
- Path: `assets/game-assets/fonts/preloads/main-game/fnt-special-win`
|
||||
- Steps:
|
||||
1. Import font files.
|
||||
- 
|
||||
2. Add font to the special win component.
|
||||
- 
|
||||
3. Configure text alignment, font size, and spacing.
|
||||
- 
|
||||
|
||||
**Tip**:
|
||||
- Move assets to `custom-scale/` to resolve image quality issues.
|
||||
- Customize font styles based on game design.
|
||||
- [View Platform Asset Structure](/docs/category/game-asset-structure)
|
63
docs/02-setup-main-game/05-main-scene/07-item-description.md
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
sidebar_position: 7
|
||||
---
|
||||
|
||||
# Item Description
|
||||
|
||||
## Overview
|
||||
The **Item Description** system provides detailed information about game items, including payouts and descriptions.
|
||||
|
||||

|
||||
|
||||
## Asset Preparation
|
||||
| Assets | Description |
|
||||
|--------|-------------|
|
||||
|  | Background setup. |
|
||||
|  | Static symbol setup. |
|
||||
|  | Animation symbol setup. |
|
||||
|  | Payout or description text setup. |
|
||||
|
||||
## Setup
|
||||
1. **Locate Template Prefabs**:
|
||||
- Search for the `template-item-description` prefab.
|
||||
- 
|
||||
2. **Clone Assets**:
|
||||
- Copy and paste to the game assets location, removing unnecessary prefixes.
|
||||
- 
|
||||
|
||||
### Prefab Configurations
|
||||
- **item-description-small** (Items with win payout only):
|
||||
- 
|
||||
- Steps:
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Set **Sprite Frame** in `background` using prepared assets. |  |
|
||||
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. |  |
|
||||
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. |  |
|
||||
| 4 | Adjust **Color**, **Font**, and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. |  |
|
||||
|
||||
- **item-description-no-odds** (Items with description only):
|
||||
- 
|
||||
- Steps:
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Set **Sprite Frame** in `background` using prepared assets. |  |
|
||||
| 2 | Name prefab as `item-description-<name>` and set **Animation Name** in **Animation Provider**. |  |
|
||||
| 3 | Set **Sprite Frame** in `sprite-item` using prepared assets. |  |
|
||||
| 4 | Set **String**, **Color**, **Font**, and **Font Size** in `description`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. |  |
|
||||
|
||||
- **item-description-big** (Items with both payout and description):
|
||||
- 
|
||||
- Steps:
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Set **Sprite Frame** in `background` using prepared assets. |  |
|
||||
| 2 | Follow **Step 4** of `item-description-small` for payout setup. | [See Small Setup](#prefab-configurations) |
|
||||
| 3 | Follow **Step 4** of `item-description-no-odds` for description setup. | [See No-Odds Setup](#prefab-configurations) |
|
||||
**Tip**:
|
||||
- Use the helper tool to configure:
|
||||
1. Set **Content Size** and **Cell Item Size** per game design.
|
||||
2. Use prepared bitmap fonts for **Labels**.
|
||||
3. Click **Set Size** to run the helper.
|
||||
4. Configure **Background**, **Sprite Frame**, **Animation**, **Payout**, and **Description** using prepared assets.
|
||||
- 
|
74
docs/02-setup-main-game/05-main-scene/08-free-round.md
Normal file
@ -0,0 +1,74 @@
|
||||
---
|
||||
sidebar_position: 8
|
||||
title: Free Round
|
||||
description: Display and manage remaining free rounds in the game.
|
||||
---
|
||||
|
||||
# Free Round System
|
||||
|
||||
## Overview
|
||||
The **Free Round** system manages the display and logic for tracking remaining free rounds with fixed bet in the game, supporting both desktop and mobile platforms.
|
||||
- **International theme popup**
|
||||

|
||||
- **Chinese theme popup**
|
||||

|
||||
|
||||
|
||||
| Platform | Preview |
|
||||
|----------|---------|
|
||||
| Desktop |  |
|
||||
| Mobile |  |
|
||||
|
||||
## Asset Preparation
|
||||
- **Core Assets**:
|
||||
- Path: `assets/core-assets/hyper-core/packages/freeround-count-box/prefabs`
|
||||
- 
|
||||
- **Game Assets**:
|
||||
- Path: `assets/game-assets/prefabs`
|
||||
- 
|
||||
|
||||
## Setup
|
||||
1. **General Configuration**:
|
||||
- Ensure script references correct nodes.
|
||||
- 
|
||||
- Properties:
|
||||
| Property | Description |
|
||||
|----------|-------------|
|
||||
| `duration` | Duration of fade in/out animation (seconds). |
|
||||
| `content` | Container node for the counter. |
|
||||
| `labelLeft` | Label showing remaining free rounds. |
|
||||
- 
|
||||
|
||||
2. **Platform Setup**:
|
||||
- **Desktop**:
|
||||
- Add `Platform-ui-controller` component.
|
||||
- 
|
||||
- **Mobile**:
|
||||
- Add `Platform-ui-controller` and `UI Mobile Position` components.
|
||||
- 
|
||||
|
||||
3. **Asset Setup**:
|
||||
- **Desktop**:
|
||||
- Path: `assets/game-assets/textures/desktop/preloads/main-game/custom-scale`
|
||||
- 
|
||||
- **Mobile**:
|
||||
- Path: `assets/game-assets/textures/mobile/preloads/main-game/custom-scale`
|
||||
- 
|
||||
- **Common**:
|
||||
- Free Round Background: 
|
||||
|
||||
4. **Font Setup**:
|
||||
- 
|
||||
|
||||
**Tip**:
|
||||
- Follow game design for position and size.
|
||||
- Use separate textures for Desktop and Mobile.
|
||||
- Ensure the main scene includes the popup panel ([See Popup Panel Guide](/docs/setup-main-game/main-scene/popup-panel#multiple-popup-panel)).
|
||||
|
||||
## Game Result Example
|
||||
| Platform | Popup | Action | Result |
|
||||
|----------|-------|--------|--------|
|
||||
| Desktop |  | Click → Start |  |
|
||||
| Mobile |  | Click → Start |  |
|
||||
|
||||

|
98
docs/02-setup-main-game/05-main-scene/09-info-pages.md
Normal file
@ -0,0 +1,98 @@
|
||||
---
|
||||
sidebar_position: 9
|
||||
---
|
||||
|
||||
# Info Pages
|
||||
|
||||
## Overview
|
||||
**Info Pages** provide players with details about game rules, features, symbols, payout structures, and mechanics. They are divided into **Paytable** and **Rules** sections, with different layouts for Desktop and Mobile.
|
||||
|
||||
| Platform | Desktop | Mobile |
|
||||
|----------|---------|--------|
|
||||
| Paytable/Rules | <br/><br/> | <br/> |
|
||||
|
||||
## Asset Preparation
|
||||
| Assets | Description |
|
||||
|--------|-------------|
|
||||
|  | Used for **Rules** or RichText images. |
|
||||
|  | Used for **Paytable** setup. |
|
||||
|
||||
## Desktop Setup
|
||||
1. **Locate Template Prefabs**:
|
||||
- Search for the `desktop-hyper-info-panel` prefab.
|
||||
- 
|
||||
2. **Clone Assets**:
|
||||
- Copy and paste to the game assets location, removing unnecessary prefixes.
|
||||
- 
|
||||
|
||||
### desktop-info-panel
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Change **Color** in `page-background` per game design. |  |
|
||||
| 2 | Change **Color** in `menu-header-background` per game design. |  |
|
||||
| 3 | Update **Prefab** in `paytable-content` using prepared prefabs. |  |
|
||||
| 4 | Update **Prefab** in `rules-content` using prepared prefabs. |  |
|
||||
|
||||
### desktop-paytable-content
|
||||
- **Item with Payout**:
|
||||
- 
|
||||
- Steps:
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Set **Item Name** and **Odds Items** per game design. |  |
|
||||
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. |  |
|
||||
| 3 | Change **Color** in `multi-x...` and `odds-x...` per game design. |  |
|
||||
| 4 | Adjust **Font** and **Font Size** in `multi-x...` and `odds-x...`. Use [Bitmap Font Creator](http://localhost:3000/docs/category/game-asset-structure) if needed. |  |
|
||||
|
||||
- **Item with Description**:
|
||||
- 
|
||||
- Steps:
|
||||
| Step | Action | Image Reference |
|
||||
|------|--------|-----------------|
|
||||
| 1 | Set **Name** per game design. |  |
|
||||
| 2 | Set **Sprite Frame** in `item-display` using prepared assets. |  |
|
||||
| 3 | Change **String** in `description` per game design. |  |
|
||||
|
||||
- **Feature Game**:
|
||||
- Configure based on game features (e.g., **FREESPIN BONUS**, **BONUS FEATURE**):
|
||||
- **Title**: Update **String** and **Color** in `freespins-bonus-title`.
|
||||
- **Image**: Set **Sprite Frame** in `freespins-bonus-image-...` using prepared assets.
|
||||
- **Description**: Update **String** in `freespins-bonus-description`.
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
|
||||
### desktop-rules-content
|
||||
- Types: **Lines** or **Ways**.
|
||||
- Steps:
|
||||
1. Set **Sprite Frame** in `lines-image` using prepared assets.
|
||||
2. Change **Color** in `lines-title` per game design.
|
||||
3. For **Ways**:
|
||||
- Update **String** in `lines-title` to **WIN WAYS/DYNAWAYS**.
|
||||
- Enable and update **String** in `lines-description`.
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
- 
|
||||
|
||||
## Mobile Setup
|
||||
1. **Locate Template Prefabs**:
|
||||
- Search for the `mobile-ui` prefab.
|
||||
- 
|
||||
2. **Clone Assets**:
|
||||
- Copy and paste to the game assets location, removing unnecessary prefixes.
|
||||
- 
|
||||
3. **Configure Prefabs**:
|
||||
- Configure `mobile-paytable-content` and `mobile-rules-content` as described in [Desktop Setup](#desktop-setup).
|
||||
4. **Spawner Positions**:
|
||||
- For **Paytable**: Use `mobile-paytable-content-spawner` in the `mobile-ui` prefab.
|
||||
- 
|
||||
- For **Rules**: Use `mobile-rule-content-spawner` in the `mobile-ui` prefab.
|
||||
- 
|
||||
|
||||
**Tip**:
|
||||
- If the game has a server, verify config settings:
|
||||
1. Open DevTools, navigate to the **Network** tab, and find the message with **event** = "config".
|
||||
2. Compare **paytable** values with the configured setup.
|
||||
- 
|
@ -0,0 +1,58 @@
|
||||
---
|
||||
sidebar_position: 10
|
||||
---
|
||||
|
||||
# Desktop Bottom Bar UI
|
||||
|
||||
## Overview
|
||||
The **Bottom Bar UI** provides a functional interface for gameplay controls on desktop, using a horizontal layout to maximize screen width.
|
||||
|
||||

|
||||
|
||||
## Implementation
|
||||
1. **Set Up Prefab Editor**:
|
||||
- **Locate Prefab**:
|
||||
- Search for `ui-bottom-bar-panel` prefab.
|
||||
- 
|
||||
- **Find Assets**:
|
||||
- Navigate to `core/editor` directory.
|
||||
- 
|
||||
- **Clone Assets**:
|
||||
- Copy and paste to the game assets location.
|
||||
- 
|
||||
|
||||
2. **Configure Prefabs**:
|
||||
- **Core Prefabs Structure**:
|
||||
- Path: `assets/core-assets/hyper-core/packages/ui/desktop-ui/prefabs`
|
||||
- 
|
||||
- **Rename Prefabs**:
|
||||
- Remove unnecessary prefixes:
|
||||
| Prefix to Remove | Original Name | Final Name |
|
||||
|------------------|---------------|------------|
|
||||
| `template-new-` | `template-new-ui-bottom-bar-panel` | `ui-bottom-bar-panel` |
|
||||
| `template-` | `template-button-auto-selection` | `button-auto-selection` |
|
||||
- 
|
||||
- **Customize `button-auto-selection` Label**:
|
||||
- Use `template-label-auto-selection` to adjust appearance.
|
||||
- Add **Label Outline** and **Label Shadow** for better readability.
|
||||
- 
|
||||
- **Customize `ui-bottom-bar-panel` Label**:
|
||||
- Use `assets/game-assets/editor/bottom-ui/template-label-title`.
|
||||
- Include a localization component for multi-language support.
|
||||
- 
|
||||
- **FormatText Properties**:
|
||||
| Property | Description | Example |
|
||||
|----------|-------------|---------|
|
||||
| `default` | Initial formatting state | `false` |
|
||||
| `notify` | Formatting update callback | Updates when value changes |
|
||||
|
||||
3. **Set Up UI in Main Scene**:
|
||||
- Create a new node and configure in the main scene.
|
||||
- 
|
||||
|
||||
4. **Apply Textures**:
|
||||
- Ensure assets for bottom UI and button UI text are complete.
|
||||
- 
|
||||
|
||||
5. **Run Helper Tool**:
|
||||
- Configure the bottom bar UI using the helper tool.
|
96
docs/02-setup-main-game/05-main-scene/11-ui-mobile-panel.md
Normal file
@ -0,0 +1,96 @@
|
||||
---
|
||||
sidebar_position: 11
|
||||
---
|
||||
|
||||
# Mobile UI Panel
|
||||
|
||||
## Overview
|
||||
The Mobile UI provides a responsive interface for gameplay controls, adapting to both **Landscape** and **Portrait** orientations on mobile devices.
|
||||
|
||||
| Orientation | Preview |
|
||||
|-------------|---------|
|
||||
| Landscape |  |
|
||||
| Portrait |  |
|
||||
|
||||
## Implementation
|
||||
|
||||
### Step 1: Set Up Prefabs
|
||||
Configure the necessary prefabs for the Mobile UI.
|
||||
|
||||
| Step | Action | Description | Image Reference |
|
||||
|------|--------|-------------|-----------------|
|
||||
| 1 | Locate `mobile-ui` Prefab | Search for the `mobile-ui` prefab in the project assets. |  |
|
||||
| 2 | Clone Assets | Copy the required assets to the game assets directory. |  |
|
||||
| 3 | Paste Assets | Paste into: `assets/game-assets/prefabs/mobile`. | - |
|
||||
| 4 | Locate `buy-feature` Prefab | Search for the `buy-feature` prefab. |  |
|
||||
| 5 | Paste Prefab | Paste into: `assets/game-assets/prefabs/mobile`. | - |
|
||||
|
||||
**Tip**: Maintain the following directory structure for proper prefab references:
|
||||
```
|
||||
assets/
|
||||
└── game-assets/
|
||||
└── prefabs/
|
||||
└── mobile/
|
||||
├── mobile-ui.prefab
|
||||
└── buy-feature.prefab
|
||||
```
|
||||
|
||||
### Step 2: Rename Prefabs
|
||||
Rename the copied prefabs by removing unnecessary prefixes to ensure consistency.
|
||||
|
||||
| Prefix to Remove | Example |
|
||||
|------------------|---------|
|
||||
| `template-` |  |
|
||||
|
||||
### Step 3: Configure UI in Main Scene
|
||||
Add and configure a new node in the main scene to integrate the Mobile UI.
|
||||
|
||||

|
||||
|
||||
**Platform Node Spawner Settings**:
|
||||
|
||||
### Step 4: Apply Textures
|
||||
Ensure all Mobile UI assets are prepared and applied correctly.
|
||||
|
||||

|
||||
|
||||
**Run the Helper Tool**:
|
||||
- Use the Mobile UI helper tool to configure the UI components.
|
||||
|
||||
### Step 5: Set Color Theme for Mobile UI
|
||||
Customize the color theme for the Mobile UI using the `helper-paint-color-ui-mobile.js` component to apply theme-based colors across UI elements.
|
||||
|
||||
**Follow Design**:
|
||||
| Landscape | Portrait |
|
||||
|-----------|----------|
|
||||
|  |  |
|
||||
|
||||
**Configuration Steps**:
|
||||
1. **Access the Helper Component**:
|
||||
- Locate the `helper-paint-color-ui-mobile.js` component in the node inspector.
|
||||
- 
|
||||
|
||||
2. **Configure Color Properties**:
|
||||
- Adjust the following properties to match the game design:
|
||||
|
||||
| # | Property | Description | Example |
|
||||
|---|----------|-------------|---------|
|
||||
| 0 | **Paint Color** | Triggers repainting of UI components. |  |
|
||||
| 1 | **Main UI Normal Color** | Default color for UI elements (e.g., Buy, Close, Auto). |  |
|
||||
| 2 | **Main UI Highlight Color** | Color for highlighted or selected UI elements. |  |
|
||||
| 3 | **Toggle State Off Color** | Color for toggles in the off state. |  |
|
||||
| 4 | **Toggle State On Color** | Color for toggles in the on state. |  |
|
||||
| 5 | **Background Info Page Color** | Background color for info pages. |  |
|
||||
| 6 | **Background Menu Color** | Background color for menus. |  |
|
||||
| 7 | **Background Point Panel Color** | Background color for point/balance panels. |  |
|
||||
| 8 | **Background Bottom Bar Color** | Background color for the bottom bar (Portrait only). |  |
|
||||
| 9 | **Button Quit Color** | Color for the Quit button. |  |
|
||||
| 10 | **Button Cancel Color** | Color for the Cancel button. |  |
|
||||
| 11 | **Label Balance Normal Color** | Color for the balance label in normal state. |  |
|
||||
| 12 | **Label Balance Spin Color** | Color for the balance label during spins. |  |
|
||||
| 13 | **Button Plus/Minus Auto Color** | Color for Plus/Minus buttons in autoplay. |  |
|
||||
| 14 | **Label Start Auto Color** | Color for the Start Autoplay label. |  |
|
||||
| 15 | **Label Outline Notification** | Outline color and width for notifications. |  |
|
||||
| 16 | **Total Win Medium Win Color** | Color for medium win labels. |  |
|
||||
|
||||
**Tip**: Ensure color values align with the game’s visual design specifications.
|
48
docs/02-setup-main-game/05-main-scene/12-popup-panel.md
Normal file
@ -0,0 +1,48 @@
|
||||
---
|
||||
sidebar_position: 12
|
||||
---
|
||||
|
||||
# Popup Panel
|
||||
|
||||
## Overview
|
||||
The **Popup Panel** is a temporary UI element that overlays the main game content to display additional information or user options, such as exit prompts or disconnection notices.
|
||||
|
||||
| Exit Popup | Disconnect Popup | Free Rounds Popup |
|
||||
|------------|------------------|--------------|
|
||||
|  |  |  |
|
||||
|
||||
## Multiple Popup Panel
|
||||
The **Multiple Popup Panel** is pre-integrated into the main scene via the `template-main-game` prefab, allowing multiple popups to be managed efficiently.
|
||||
|
||||

|
||||
|
||||
**Base Settings**:
|
||||
- **Prefab**: `hyper-multiple-popup.prefab`
|
||||
- **Path**: `assets/core-assets/hyper-core/packages/popup-panel/prefabs/hyper-multiple-popup.prefab`
|
||||
- **Configuration**: Reference the prefab in the main scene to enable multiple popup layouts.
|
||||
- 
|
||||
|
||||
## Manual Popup Panel
|
||||
Manually configured popups allow for custom textures and layouts, tailored to the game’s design. Note that the **Exit Game** popup is exclusive to the Desktop platform.
|
||||
|
||||
**Setup Steps**:
|
||||
1. **Prepare Assets**:
|
||||
- **Path**: `assets/game-assets/textures/desktop/preloads/main-game/exit`
|
||||
- **Example**: 
|
||||
|
||||
2. **Configure Prefabs**:
|
||||
- Locate and clone the popup prefab to `assets/game-assets/prefabs`.
|
||||
- Structure the prefab as shown:
|
||||
- 
|
||||
|
||||
3. **Apply Textures**:
|
||||
- Manually drag and drop images onto the corresponding nodes in the editor.
|
||||
- 
|
||||
|
||||
4. **Preview Result**:
|
||||
- Verify the popup displays correctly in the game.
|
||||
- 
|
||||
|
||||
**Tip**:
|
||||
- Ensure textures align with the game’s color theme and design specifications.
|
||||
- Test the popup on Desktop to confirm functionality for the Exit Game feature.
|
117
docs/02-setup-main-game/05-main-scene/13-game-logo.md
Normal file
@ -0,0 +1,117 @@
|
||||
---
|
||||
sidebar_position: 13
|
||||
---
|
||||
|
||||
# Game Logo
|
||||
|
||||
## Overview
|
||||
The **Game Logo** is a key branding element displayed consistently across all platforms and orientations to reinforce the game’s identity.
|
||||
|
||||
| Platform | Orientation | Preview |
|
||||
|----------|-------------|---------|
|
||||
| Desktop | Standard |  |
|
||||
| Mobile | Landscape |  |
|
||||
| Mobile | Portrait |  |
|
||||
|
||||
## Implementation
|
||||
|
||||
### Prepare Assets
|
||||
|
||||
#### 1. Core Setup
|
||||
- **Location**: `assets/core-assets/hyper-core/packages/hyper-logo-animation`
|
||||
- **Script**: Initialize animation states for the logo.
|
||||
```typescript
|
||||
// File: assets/core-assets/hyper-core/packages/logo-animation/hyper-logo-animation.js
|
||||
onLoad: function () {
|
||||
const self = this;
|
||||
// Initialize animation states
|
||||
self.animPlay = AnimationProvider.Instance.GetAnimation('anim-logo-play');
|
||||
self.animIdle = AnimationProvider.Instance.GetAnimation('anim-logo-idle');
|
||||
}
|
||||
```
|
||||
|
||||
#### 2. Required Assets
|
||||
|
||||
**Static Assets**:
|
||||
| Platform | Location | Preview |
|
||||
|----------|----------|---------|
|
||||
| Desktop | `assets/game-assets/textures/desktop/preloads/main-game/custom-scale` |  |
|
||||
| Mobile | `assets/game-assets/textures/mobile/preloads/main-game/custom-scale` |  |
|
||||
|
||||
**Animation Assets**:
|
||||
| Platform | Location | Preview |
|
||||
|----------|----------|---------|
|
||||
| Desktop | `assets/game-assets/textures/desktop/postloads/main-game/animations` |  |
|
||||
| Mobile | `assets/game-assets/textures/mobile/postloads/main-game/animations` |  |
|
||||
|
||||
#### 3. Animation Settings
|
||||
1. **Configure Animation Provider**:
|
||||
- Register the logo animations in the Animation Provider.
|
||||
- 
|
||||
|
||||
2. **Set Up Animation States**:
|
||||
- Enable a static frame for the loading state in `anim-logo-play` and `anim-logo-idle`.
|
||||
- 
|
||||
- Configure continuous loop playback for animations.
|
||||
- 
|
||||
|
||||
### Setup
|
||||
|
||||
#### Desktop Configuration
|
||||
1. **Base Settings**:
|
||||
- Configure the logo node in the main scene.
|
||||
- 
|
||||
|
||||
2. **Node Setup**:
|
||||
- Add the `hyper-logo-animation` component to the logo node.
|
||||
- ```typescript
|
||||
Components: {
|
||||
animation: 'hyper-logo-animation',
|
||||
}
|
||||
```
|
||||
- 
|
||||
|
||||
**Tip**: Adjust position and size according to the game design specifications.
|
||||
|
||||
#### Mobile Configuration
|
||||
|
||||
##### Landscape Mode
|
||||
1. **Node Setup**:
|
||||
- Configure the logo node with the following components:
|
||||
| Component | Description |
|
||||
|-----------|-------------|
|
||||
| `hyper-logo-animation` | Plays and manages the logo animation. |
|
||||
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
|
||||
| `landscape-logo-spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
|
||||
- 
|
||||
|
||||
##### Portrait Mode
|
||||
1. **Node Setup**:
|
||||
- Configure the logo node with the following components:
|
||||
| Component | Description |
|
||||
|-----------|-------------|
|
||||
| `hyper-logo-animation` | Plays and manages the logo animation. |
|
||||
| `node-position-by-jackpot` | Adjusts logo position based on jackpot display state. |
|
||||
| `spine-aspect-ratio-keeper` | Maintains consistent logo size (e.g., 1.0). |
|
||||
- 
|
||||
|
||||
2. **Position Settings**:
|
||||
- Adjust logo position based on jackpot state:
|
||||
| State | Position | Example |
|
||||
|-------|----------|---------|
|
||||
| Jackpot Active | Upper position |  |
|
||||
| Jackpot Inactive | Default position |  |
|
||||
|
||||
3. **Size Settings**:
|
||||
- Use the `spine-aspect-ratio-keeper` component to maintain logo proportions.
|
||||
- 
|
||||
- **Settings**:
|
||||
| Setting | Description | Default Value |
|
||||
|---------|-------------|---------------|
|
||||
| **Default Scale** | Initial scale factor for the node. | Configurable (e.g., 1.0) |
|
||||
| **Default Size** | Base width and height for scaling. | Configurable (e.g., 1050 x 1680) |
|
||||
|
||||
**Tip**:
|
||||
- Test the static logo display under slow network conditions to ensure fallback works.
|
||||
- Verify animation states (`play` and `idle`) for smooth transitions.
|
||||
- [See More Info](/docs/category/game-asset-structure)
|
61
docs/02-setup-main-game/05-main-scene/15-jackpot-panel.md
Normal file
@ -0,0 +1,61 @@
|
||||
---
|
||||
sidebar_position: 15
|
||||
---
|
||||
|
||||
# Jackpot Panel
|
||||
|
||||
## Overview
|
||||
The **Jackpot Feature** offers multiple prize tiers, each with increasing value, providing players with frequent smaller wins and the chance for a large top prize. The panel is responsive, supporting both desktop and mobile layouts.
|
||||
|
||||
**Jackpot Tiers**:
|
||||
| Tier | Description | Preview |
|
||||
|------|-------------|---------|
|
||||
| Grand | The top prize, rare and often worth thousands or millions (progressive). |  |
|
||||
| Major | A significant prize, less frequent but substantial. |  |
|
||||
| Minor | A moderately valuable prize, relatively common. |  |
|
||||
| Mini | The smallest prize, easiest to win. |  |
|
||||
|
||||
**Platform Support**:
|
||||
| Orientation | Preview |
|
||||
|-------------|---------|
|
||||
| Desktop |  |
|
||||
| Mobile |  |
|
||||
|
||||
## Implementation
|
||||
|
||||
### Prepare Assets
|
||||
- **Prefab Location**:
|
||||
- Path: `assets/core-assets/jackpot-package/prefabs`
|
||||
- Example: 
|
||||
|
||||
### Setup
|
||||
|
||||
#### Jackpot Runner
|
||||
|
||||
##### Desktop
|
||||
1. **Add Node**:
|
||||
- Integrate the jackpot node into the main scene.
|
||||
- 
|
||||
|
||||
##### Mobile
|
||||
1. **Configure Node**:
|
||||
- Set up the jackpot node for both landscape and portrait orientations.
|
||||
- Use `UI Mobile Landscape Position` and `UI Mobile Portrait Position` components for responsiveness.
|
||||
- 
|
||||
|
||||
2. **Platform Node Spawner**:
|
||||
- Example: 
|
||||
|
||||
#### Result Panel
|
||||
- Ensure the jackpot panel displays correctly across all platforms and orientations.
|
||||
- 
|
||||
|
||||
**Tip**: Follow the game design layout for positioning and sizing.
|
||||
|
||||
## Game Result Examples
|
||||
| Win Tier | Example |
|
||||
|----------|---------|
|
||||
| Grand |  |
|
||||
| Major |  |
|
||||
| Minor |  |
|
||||
| Mini |  |
|
64
docs/02-setup-main-game/05-main-scene/16-idle-animation.md
Normal file
@ -0,0 +1,64 @@
|
||||
---
|
||||
sidebar_position: 16
|
||||
---
|
||||
|
||||
# Idle Animation
|
||||
|
||||
## Overview
|
||||
The **Idle Animation** enhances the visual appeal of the game by animating slot symbols during idle states, providing a dynamic and engaging experience.
|
||||
|
||||
| Static Preview | Animated Preview |
|
||||
|--------|-------------|
|
||||
|  |  |
|
||||
|
||||
|
||||
## Prepare the assets
|
||||
|
||||
| Assets | Description |
|
||||
|--------|-------------|
|
||||
|  | Static sprite frame for the idle state. |
|
||||
|  | Animation assets for the idle animation. |
|
||||
|
||||
## Setup Idle Animation
|
||||
|
||||
### Configure Settings
|
||||
|
||||
Create a script to register the idle animation components with the dependency injection container.
|
||||
```jsx title="assets/game-assets/scripts/slotty-settings/extend-slotty-setting.js"
|
||||
var BaseSlottySetting = p4fslot.require('slotty-setting');
|
||||
var DIContainer = p4fcore.require('di-container');
|
||||
|
||||
BaseSlottySetting.prototype._registerInjection = function () {
|
||||
DIContainer.Register('cellItemRender', require('idle-cell-item-render'));
|
||||
DIContainer.Register('idleAnimationHandler', require('idle-animation-handler'));
|
||||
};
|
||||
```
|
||||
|
||||
### Setup Animations
|
||||
1. Using hepler to generate animation using the prepared assets
|
||||
|
||||

|
||||

|
||||
|
||||
2. Configure Spine Animation
|
||||
- Set **Is Loop** ✅.
|
||||
- Setup the **Static Sprite Frame** using the prepared assets.
|
||||
|
||||

|
||||
### Configure Scene
|
||||
|
||||
1. **Locate Prefab**:
|
||||
- Search for the `idle-animation-panel` prefab.
|
||||
2. **Add to Scene**:
|
||||
- Drag the prefab into the main scene.
|
||||
3. **Generate Panel**:
|
||||
- Click **Generate Panel** to set up the animation panel.
|
||||
-
|
||||
|
||||
:::warning
|
||||
When using prefabs directly from `core-assets`, convert them to a **Regular Node** to avoid reference issues.
|
||||
|
||||

|
||||
:::
|
||||
|
||||
**Tip**: Test the idle animation in the game to ensure smooth playback and proper looping.
|