Compare commits

..

4 Commits

Author SHA1 Message Date
2af308f258 add doc present feature win 2025-07-15 17:45:47 +07:00
6ad5c9d960 add after spin controller 2025-07-15 17:45:47 +07:00
bfd25398c1 update name script 2025-07-15 14:03:02 +07:00
833ddaddcd add take and gamble doc 2025-07-15 13:33:59 +07:00
6 changed files with 168 additions and 12 deletions

View File

@ -1,14 +1,18 @@
--- ---
---
sidebar_position: 2 sidebar_position: 2
--- ---
# Auto Spin Model # EndRoundModel
## Overview ## Overview
* EndRoundModel is a model class for the spin feature in the slot game. It extends the base model class and is intended to handle the visual representation and UI logic for spins. `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: ## Description
* Initializes a new instance of EndRoundModel.
* Calls the base model constructor. - Initializes a new instance of `EndRoundModel`.
* [p4f-game-core/src/view/end-round-model.js:#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/model/end-round-model.js#L5) - 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)

View File

@ -2,13 +2,14 @@
sidebar_position: 3 sidebar_position: 3
--- ---
# Auto Spin view # EndRoundView
## Overview ## Overview
* EndRoundView 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. 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: ## Description
* Initializes a new instance of EndRoundView.
* Calls the base View constructor. - Constructs a new EndRoundView instance.
* [p4f-game-core/src/view/end-round-view.js:#L5](https://gitea.plp19.com/cocos-core/p4f-slotty-core/src/commit/7fbf58bf2ad8edec4258757b353151b638c96652/src/view/end-round-view.js#L5) - 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)

View 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"
]
}
}

View File

@ -0,0 +1,101 @@
---
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) |

View File

@ -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)

View File

@ -0,0 +1,16 @@
---
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)