180 lines
7.1 KiB
Markdown
180 lines
7.1 KiB
Markdown
---
|
|
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) |
|