pixi-rainman-game-engine 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ComponentRegistry/ComponentRegistry.d.ts +0 -17
- package/dist/ComponentRegistry/ComponentRegistry.js +0 -17
- package/dist/ComponentRegistry/types.d.ts +1 -1
- package/dist/Money/MoneyText.d.ts +0 -2
- package/dist/Money/MoneyText.js +0 -2
- package/dist/Rainman/Rainman.d.ts +0 -2
- package/dist/Rainman/Rainman.js +0 -2
- package/dist/Rainman/appConfig.d.ts +0 -1
- package/dist/Rainman/appConfig.js +0 -1
- package/dist/application/ApiConfig/ApiConfig.d.ts +25 -43
- package/dist/application/ApiConfig/ApiConfig.js +25 -43
- package/dist/application/ApiConfig/SymbolId.d.ts +0 -5
- package/dist/application/ApiConfig/TransformationTypesId.d.ts +0 -4
- package/dist/application/ApiConfig/WinTypeId.d.ts +0 -4
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +11 -32
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +11 -32
- package/dist/application/SoundManager/SoundManager.d.ts +8 -18
- package/dist/application/SoundManager/SoundManager.js +8 -18
- package/dist/application/SoundManager/types.d.ts +2 -4
- package/dist/application/SoundManager/types.js +1 -2
- package/dist/application/SpeedState/SpeedLevelHandler.d.ts +2 -8
- package/dist/application/SpeedState/SpeedLevelHandler.js +2 -8
- package/dist/application/SpinLogic/SpinLogic.d.ts +0 -2
- package/dist/application/SpinLogic/SpinLogic.js +0 -2
- package/dist/application/SpinLogic/SpinLogicDTO.d.ts +4 -9
- package/dist/application/SpinLogic/SpinLogicDTO.js +4 -9
- package/dist/application/SpinLogic/WinScenarios.d.ts +1 -1
- package/dist/application/SpinLogic/WinScenarios.js +1 -1
- package/dist/application/SpinLogic/util.d.ts +13 -18
- package/dist/application/SpinLogic/util.js +13 -20
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.d.ts +1 -3
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.js +1 -3
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +19 -22
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +19 -22
- package/dist/components/GambleGame/GambleGame.d.ts +1 -3
- package/dist/components/GambleGame/GambleGame.js +1 -3
- package/dist/components/buttons/BaseButton/BaseButton.d.ts +1 -3
- package/dist/components/buttons/BaseButton/BaseButton.js +1 -3
- package/dist/components/buttons/BaseButton/ButtonState.d.ts +1 -1
- package/dist/components/buttons/BaseButton/ButtonState.js +1 -1
- package/dist/components/buttons/buttonGroups/LeftButtons.d.ts +1 -3
- package/dist/components/buttons/buttonGroups/LeftButtons.js +1 -3
- package/dist/components/buttons/buttonGroups/MiddleButtons.d.ts +0 -1
- package/dist/components/buttons/buttonGroups/MiddleButtons.js +0 -1
- package/dist/components/buttons/buttonGroups/RightButtons.d.ts +2 -3
- package/dist/components/buttons/buttonGroups/RightButtons.js +2 -3
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.d.ts +1 -1
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.js +1 -1
- package/dist/components/buttons/default/AutoplayButton.d.ts +2 -3
- package/dist/components/buttons/default/AutoplayButton.js +2 -3
- package/dist/components/buttons/default/BlackButton.d.ts +1 -2
- package/dist/components/buttons/default/BlackButton.js +1 -2
- package/dist/components/buttons/default/CollectButton.d.ts +2 -3
- package/dist/components/buttons/default/CollectButton.js +2 -3
- package/dist/components/buttons/default/InfoButton.d.ts +1 -1
- package/dist/components/buttons/default/InfoButton.js +1 -1
- package/dist/components/buttons/default/MoreButton.d.ts +1 -1
- package/dist/components/buttons/default/MoreButton.js +1 -1
- package/dist/components/buttons/default/NegButton.d.ts +1 -1
- package/dist/components/buttons/default/NegButton.js +1 -1
- package/dist/components/buttons/default/PlusButton.d.ts +1 -1
- package/dist/components/buttons/default/PlusButton.js +1 -1
- package/dist/components/buttons/default/RedButton.d.ts +1 -1
- package/dist/components/buttons/default/RedButton.js +1 -1
- package/dist/components/buttons/default/RefreshButton.d.ts +2 -1
- package/dist/components/buttons/default/RefreshButton.js +2 -1
- package/dist/components/buttons/default/SpeedControlButton.d.ts +1 -1
- package/dist/components/buttons/default/SpeedControlButton.js +1 -1
- package/dist/components/buttons/default/SpinConfirmationButton.d.ts +1 -0
- package/dist/components/buttons/default/SpinConfirmationButton.js +1 -0
- package/dist/components/buttons/default/VolumeButton.d.ts +1 -1
- package/dist/components/buttons/default/VolumeButton.js +1 -1
- package/dist/components/common/AnimatedBackground.d.ts +1 -5
- package/dist/components/common/AnimatedBackground.js +1 -5
- package/dist/components/common/Background.d.ts +3 -5
- package/dist/components/common/Background.js +3 -5
- package/dist/components/common/FreeSpinButton.d.ts +1 -3
- package/dist/components/common/FreeSpinButton.js +1 -3
- package/dist/components/common/Logo.d.ts +1 -3
- package/dist/components/common/Logo.js +1 -3
- package/dist/components/common/LogoStatic.d.ts +1 -3
- package/dist/components/common/LogoStatic.js +1 -3
- package/dist/components/common/ResumableContainers.d.ts +6 -6
- package/dist/components/common/ResumableContainers.js +6 -6
- package/dist/components/frame/AbstractColumnsContainer.d.ts +3 -9
- package/dist/components/frame/AbstractColumnsContainer.js +3 -9
- package/dist/components/frame/AbstractFrame.d.ts +6 -12
- package/dist/components/frame/AbstractFrame.js +6 -12
- package/dist/components/frame/AbstractInnerFrame.d.ts +1 -3
- package/dist/components/frame/AbstractInnerFrame.js +1 -3
- package/dist/components/frame/WinLineAnimation.d.ts +1 -3
- package/dist/components/frame/WinLineAnimation.js +1 -3
- package/dist/components/frame/constants.d.ts +7 -0
- package/dist/components/frame/constants.js +3 -0
- package/dist/components/frame/types.d.ts +4 -0
- package/dist/components/messageBox/MessageBox.d.ts +1 -3
- package/dist/components/messageBox/MessageBox.js +1 -3
- package/dist/components/symbols/AbstractSymbolBase.d.ts +1 -2
- package/dist/components/symbols/AbstractSymbolBase.js +1 -2
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +1 -3
- package/dist/components/symbols/AbstractSymbolsColumn.js +1 -3
- package/dist/components/symbols/DroppableSymbol.d.ts +0 -2
- package/dist/components/symbols/DroppableSymbol.js +0 -2
- package/dist/components/symbols/DroppableSymbolsColumn.d.ts +0 -2
- package/dist/components/symbols/DroppableSymbolsColumn.js +0 -2
- package/dist/components/symbols/types.d.ts +0 -1
- package/dist/components/symbols/types.js +0 -1
- package/dist/components/updatable/UpdatableTextComponent.d.ts +1 -3
- package/dist/components/updatable/UpdatableTextComponent.js +1 -3
- package/dist/components/updatable/UpdatableValueComponent.d.ts +1 -3
- package/dist/components/updatable/UpdatableValueComponent.js +1 -3
- package/dist/components/winLineIndicator/WinLineIndicator.d.ts +1 -3
- package/dist/components/winLineIndicator/WinLineIndicator.js +1 -3
- package/dist/connectivity/ConnectionWrapper.d.ts +1 -4
- package/dist/connectivity/ConnectionWrapper.js +1 -4
- package/dist/connectivity/LocalConnectionWrapper.d.ts +1 -1
- package/dist/connectivity/LocalConnectionWrapper.js +1 -1
- package/dist/connectivity/apiQueue.d.ts +2 -3
- package/dist/connectivity/apiQueue.js +2 -3
- package/dist/connectivity/wins.d.ts +0 -9
- package/dist/controllers/AbstractController.d.ts +26 -40
- package/dist/controllers/AbstractController.js +27 -40
- package/dist/controllers/QuickStopController.d.ts +1 -1
- package/dist/controllers/QuickStopController.js +1 -1
- package/dist/controllers/UiController.d.ts +2 -4
- package/dist/controllers/UiController.js +2 -4
- package/dist/loading/AbstractLoadingContainer.d.ts +1 -3
- package/dist/loading/AbstractLoadingContainer.js +1 -3
- package/dist/loading/ProgressiveLoader.d.ts +0 -2
- package/dist/loading/SpriteLoadingContainer.d.ts +1 -4
- package/dist/loading/SpriteLoadingContainer.js +1 -4
- package/dist/localStorage/localStorage.d.ts +0 -2
- package/dist/localStorage/localStorage.js +0 -2
- package/dist/stores/SettingsStore.d.ts +5 -10
- package/dist/stores/SettingsStore.js +5 -10
- package/dist/utils/assets/assetGetter.d.ts +10 -18
- package/dist/utils/assets/assetGetter.js +10 -18
- package/dist/utils/common/deviceOrientation.d.ts +1 -2
- package/dist/utils/common/deviceOrientation.js +1 -2
- package/dist/utils/common/functions.d.ts +7 -7
- package/dist/utils/common/functions.js +7 -7
- package/dist/utils/common/placementHelpers.d.ts +2 -3
- package/dist/utils/common/placementHelpers.js +4 -5
- package/dist/winComponents/AnimableParticlesEmitter.d.ts +1 -4
- package/dist/winComponents/AnimableParticlesEmitter.js +1 -4
- package/dist/winComponents/PositioningFrame.d.ts +1 -3
- package/dist/winComponents/PositioningFrame.js +1 -3
- package/dist/winComponents/UpdatableSpineContainer.d.ts +1 -3
- package/dist/winComponents/UpdatableSpineContainer.js +1 -3
- package/dist/winComponents/winFactory.d.ts +8 -9
- package/dist/winComponents/winFactory.js +8 -9
- package/package.json +3 -1
|
@@ -4,8 +4,6 @@ import { AdaptedSpinResponse } from "./types";
|
|
|
4
4
|
import { WinScenarios } from "./WinScenarios";
|
|
5
5
|
/**
|
|
6
6
|
* This class represents mapped data from backend
|
|
7
|
-
*
|
|
8
|
-
* @export {SpinLogicDTO}
|
|
9
7
|
*/
|
|
10
8
|
export declare class SpinLogicDTO {
|
|
11
9
|
private rawData;
|
|
@@ -22,23 +20,20 @@ export declare class SpinLogicDTO {
|
|
|
22
20
|
get hasMysteryWin(): boolean;
|
|
23
21
|
/**
|
|
24
22
|
* Function for mapping the single win from raw backend data
|
|
25
|
-
*
|
|
26
|
-
* @param
|
|
27
|
-
* @param availableFreeSpins number of available free spins (if game have free spins)
|
|
23
|
+
* @param {WinDetails} singleWin single win from raw backend data
|
|
24
|
+
* @param {number} availableFreeSpins number of available free spins (if game have free spins)
|
|
28
25
|
* @returns {Win} mapped win
|
|
29
26
|
*/
|
|
30
27
|
private getSingleWin;
|
|
31
28
|
/**
|
|
32
29
|
* Function for mapping wins from raw backend data
|
|
33
|
-
*
|
|
34
|
-
* @param
|
|
35
|
-
* @param availableFreeSpins number of available free spins (if game have free spins)
|
|
30
|
+
* @param {WinWithTransformation} rawData raw data from backend
|
|
31
|
+
* @param {number} availableFreeSpins number of available free spins (if game have free spins)
|
|
36
32
|
* @returns {Win[]} mapped array of wins
|
|
37
33
|
*/
|
|
38
34
|
private getWinsFromRawData;
|
|
39
35
|
/**
|
|
40
36
|
* Function for converting backend symbol id to frontend symbol id
|
|
41
|
-
*
|
|
42
37
|
* @param {string} symbol backend symbol id
|
|
43
38
|
* @returns {SymbolId} frontend symbol id
|
|
44
39
|
*/
|
|
@@ -3,8 +3,6 @@ import { RainMan } from "../../Rainman";
|
|
|
3
3
|
import { WinScenarios } from "./WinScenarios";
|
|
4
4
|
/**
|
|
5
5
|
* This class represents mapped data from backend
|
|
6
|
-
*
|
|
7
|
-
* @export {SpinLogicDTO}
|
|
8
6
|
*/
|
|
9
7
|
export class SpinLogicDTO {
|
|
10
8
|
rawData;
|
|
@@ -63,9 +61,8 @@ export class SpinLogicDTO {
|
|
|
63
61
|
}
|
|
64
62
|
/**
|
|
65
63
|
* Function for mapping the single win from raw backend data
|
|
66
|
-
*
|
|
67
|
-
* @param
|
|
68
|
-
* @param availableFreeSpins number of available free spins (if game have free spins)
|
|
64
|
+
* @param {WinDetails} singleWin single win from raw backend data
|
|
65
|
+
* @param {number} availableFreeSpins number of available free spins (if game have free spins)
|
|
69
66
|
* @returns {Win} mapped win
|
|
70
67
|
*/
|
|
71
68
|
getSingleWin(singleWin, availableFreeSpins) {
|
|
@@ -87,9 +84,8 @@ export class SpinLogicDTO {
|
|
|
87
84
|
}
|
|
88
85
|
/**
|
|
89
86
|
* Function for mapping wins from raw backend data
|
|
90
|
-
*
|
|
91
|
-
* @param
|
|
92
|
-
* @param availableFreeSpins number of available free spins (if game have free spins)
|
|
87
|
+
* @param {WinWithTransformation} rawData raw data from backend
|
|
88
|
+
* @param {number} availableFreeSpins number of available free spins (if game have free spins)
|
|
93
89
|
* @returns {Win[]} mapped array of wins
|
|
94
90
|
*/
|
|
95
91
|
getWinsFromRawData(rawData, availableFreeSpins) {
|
|
@@ -97,7 +93,6 @@ export class SpinLogicDTO {
|
|
|
97
93
|
}
|
|
98
94
|
/**
|
|
99
95
|
* Function for converting backend symbol id to frontend symbol id
|
|
100
|
-
*
|
|
101
96
|
* @param {string} symbol backend symbol id
|
|
102
97
|
* @returns {SymbolId} frontend symbol id
|
|
103
98
|
*/
|
|
@@ -2,7 +2,7 @@ import { TransformationDetails, Win } from "../../connectivity";
|
|
|
2
2
|
/**
|
|
3
3
|
* This class represents win and transformation scenarios described in {@link transformationTypes} and {@link PossibleWins}
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* {WinScenarios}
|
|
6
6
|
*/
|
|
7
7
|
export declare class WinScenarios {
|
|
8
8
|
private readonly _wins;
|
|
@@ -2,42 +2,37 @@ import { DropTransformationDetails, FreezeTransformationDetails, RawFreezeTransf
|
|
|
2
2
|
import { ApiConfig } from "../ApiConfig";
|
|
3
3
|
/**
|
|
4
4
|
* Function to concatenate destroy and set transformations
|
|
5
|
-
*
|
|
6
5
|
* @param {SpinDataInterface} spinLogicResponse - parsed response from backend
|
|
7
6
|
* @param {number} currentIndexOfRootTransformation - index of root transformation
|
|
8
7
|
* @param {ApiConfig} gameConfig - api configuration
|
|
9
|
-
* @returns {[DropTransformationDetails[], number]}
|
|
8
|
+
* @returns {[DropTransformationDetails[], number]} - tuple with drop transformations and index of set transformation
|
|
10
9
|
*/
|
|
11
10
|
export declare const concatenateDestroyAndSetTransformations: (spinLogicResponse: SpinDataInterface, currentIndexOfRootTransformation: number, gameConfig: ApiConfig) => [DropTransformationDetails[], number];
|
|
12
11
|
/**
|
|
13
12
|
* Function to get freeze transformations from raw response
|
|
14
|
-
*
|
|
15
|
-
* @
|
|
16
|
-
* @returns {FreezeTransformationDetails[]}
|
|
13
|
+
* @param {RawFreezeTransformationDetails[]} transformations - raw freeze transformations
|
|
14
|
+
* @returns {FreezeTransformationDetails[]} - parsed freeze transformations
|
|
17
15
|
*/
|
|
18
16
|
export declare const getFreezeTransformationFromRawResponse: (transformations: RawFreezeTransformationDetails[]) => FreezeTransformationDetails[];
|
|
19
17
|
/**
|
|
20
18
|
* Function to concatenate freeze and spin transformations
|
|
21
|
-
*
|
|
22
|
-
* @param {
|
|
23
|
-
* @
|
|
24
|
-
* @returns {SpinAndFreezeTransformationDetails}
|
|
19
|
+
* @param {FreezeTransformationDetails[]} freezeTransformations - freeze transformations
|
|
20
|
+
* @param {SymbolReels} onStopBlindsConfiguration - symbols on reels
|
|
21
|
+
* @returns {SpinAndFreezeTransformationDetails} - concatenated freeze and spin transformations
|
|
25
22
|
*/
|
|
26
23
|
export declare const concatenateFreezeAndSpinTransformations: (freezeTransformations: FreezeTransformationDetails[], onStopBlindsConfiguration: SymbolReels) => SpinAndFreezeTransformationDetails;
|
|
27
24
|
/**
|
|
28
25
|
* Function to get vertical transformations from raw response
|
|
29
|
-
*
|
|
30
|
-
* @param {
|
|
31
|
-
* @
|
|
32
|
-
* @returns {number[][] | null}
|
|
26
|
+
* @param {Result[]} results - parsed response from backend
|
|
27
|
+
* @param {number} transformationTypeId - id of transformation type
|
|
28
|
+
* @returns {number[][] | null} - symbols on reels
|
|
33
29
|
*/
|
|
34
30
|
export declare const isBlindsConfiguredByTransformations: (results: Result[], transformationTypeId?: number) => number[][] | null;
|
|
35
31
|
/**
|
|
36
32
|
* Function for collecting win details with transformation
|
|
37
|
-
*
|
|
38
|
-
* @param {
|
|
39
|
-
* @param {
|
|
40
|
-
* @
|
|
41
|
-
* @returns {WinWithTransformation}
|
|
33
|
+
* @param {RawWin | null} winsDetails - raw win details
|
|
34
|
+
* @param {TransformationDetails[]} transformations - transformation details
|
|
35
|
+
* @param {string | null} winIndex - index of win
|
|
36
|
+
* @returns {WinWithTransformation} - win with transformation
|
|
42
37
|
*/
|
|
43
38
|
export declare const collectWinDetailsWithTransformation: (winsDetails: RawWin | null, transformations: TransformationDetails[], winIndex?: string | null) => WinWithTransformation;
|
|
@@ -2,7 +2,6 @@ import { transformationTypes } from "../../constants";
|
|
|
2
2
|
import { RainMan } from "../../Rainman";
|
|
3
3
|
/**
|
|
4
4
|
* Function to get win details from raw response
|
|
5
|
-
*
|
|
6
5
|
* @param {RawWin} rawWin - raw win details
|
|
7
6
|
* @param {string} winIndex - index of win
|
|
8
7
|
* @returns {WinDetails} mapped win details
|
|
@@ -20,7 +19,6 @@ const getWinFromRawResponse = (rawWin, winIndex) => {
|
|
|
20
19
|
};
|
|
21
20
|
/**
|
|
22
21
|
* Function to join destroy transformations with symbols on reel to get drop transformations
|
|
23
|
-
*
|
|
24
22
|
* @param {RawVerticalTransformationDetails[]} destroyTransformations - destroy transformations
|
|
25
23
|
* @param {number[][]} symbolsOnReel - symbols that should be destroyed
|
|
26
24
|
* @param {ApiConfig} gameConfig - api configuration
|
|
@@ -60,11 +58,10 @@ const joinTransformationsIntoDropTransformation = (destroyTransformations, symbo
|
|
|
60
58
|
};
|
|
61
59
|
/**
|
|
62
60
|
* Function to concatenate destroy and set transformations
|
|
63
|
-
*
|
|
64
61
|
* @param {SpinDataInterface} spinLogicResponse - parsed response from backend
|
|
65
62
|
* @param {number} currentIndexOfRootTransformation - index of root transformation
|
|
66
63
|
* @param {ApiConfig} gameConfig - api configuration
|
|
67
|
-
* @returns {[DropTransformationDetails[], number]}
|
|
64
|
+
* @returns {[DropTransformationDetails[], number]} - tuple with drop transformations and index of set transformation
|
|
68
65
|
*/
|
|
69
66
|
export const concatenateDestroyAndSetTransformations = (spinLogicResponse, currentIndexOfRootTransformation, gameConfig) => {
|
|
70
67
|
const followingResults = spinLogicResponse.results.slice(currentIndexOfRootTransformation);
|
|
@@ -87,9 +84,8 @@ export const concatenateDestroyAndSetTransformations = (spinLogicResponse, curre
|
|
|
87
84
|
};
|
|
88
85
|
/**
|
|
89
86
|
* Function to get freeze transformations from raw response
|
|
90
|
-
*
|
|
91
|
-
* @
|
|
92
|
-
* @returns {FreezeTransformationDetails[]}
|
|
87
|
+
* @param {RawFreezeTransformationDetails[]} transformations - raw freeze transformations
|
|
88
|
+
* @returns {FreezeTransformationDetails[]} - parsed freeze transformations
|
|
93
89
|
*/
|
|
94
90
|
export const getFreezeTransformationFromRawResponse = (transformations) => {
|
|
95
91
|
return transformations.map((freezeTransformation) => {
|
|
@@ -101,10 +97,9 @@ export const getFreezeTransformationFromRawResponse = (transformations) => {
|
|
|
101
97
|
};
|
|
102
98
|
/**
|
|
103
99
|
* Function to concatenate freeze and spin transformations
|
|
104
|
-
*
|
|
105
|
-
* @param {
|
|
106
|
-
* @
|
|
107
|
-
* @returns {SpinAndFreezeTransformationDetails}
|
|
100
|
+
* @param {FreezeTransformationDetails[]} freezeTransformations - freeze transformations
|
|
101
|
+
* @param {SymbolReels} onStopBlindsConfiguration - symbols on reels
|
|
102
|
+
* @returns {SpinAndFreezeTransformationDetails} - concatenated freeze and spin transformations
|
|
108
103
|
*/
|
|
109
104
|
export const concatenateFreezeAndSpinTransformations = (freezeTransformations, onStopBlindsConfiguration) => {
|
|
110
105
|
const allCoordinatesToFreeze = freezeTransformations.map((details) => details.coordinates);
|
|
@@ -116,10 +111,9 @@ export const concatenateFreezeAndSpinTransformations = (freezeTransformations, o
|
|
|
116
111
|
};
|
|
117
112
|
/**
|
|
118
113
|
* Function to get vertical transformations from raw response
|
|
119
|
-
*
|
|
120
|
-
* @param {
|
|
121
|
-
* @
|
|
122
|
-
* @returns {number[][] | null}
|
|
114
|
+
* @param {Result[]} results - parsed response from backend
|
|
115
|
+
* @param {number} transformationTypeId - id of transformation type
|
|
116
|
+
* @returns {number[][] | null} - symbols on reels
|
|
123
117
|
*/
|
|
124
118
|
export const isBlindsConfiguredByTransformations = (results, transformationTypeId = 16) => {
|
|
125
119
|
const reversedResults = [...results].reverse();
|
|
@@ -133,11 +127,10 @@ export const isBlindsConfiguredByTransformations = (results, transformationTypeI
|
|
|
133
127
|
};
|
|
134
128
|
/**
|
|
135
129
|
* Function for collecting win details with transformation
|
|
136
|
-
*
|
|
137
|
-
* @param {
|
|
138
|
-
* @param {
|
|
139
|
-
* @
|
|
140
|
-
* @returns {WinWithTransformation}
|
|
130
|
+
* @param {RawWin | null} winsDetails - raw win details
|
|
131
|
+
* @param {TransformationDetails[]} transformations - transformation details
|
|
132
|
+
* @param {string | null} winIndex - index of win
|
|
133
|
+
* @returns {WinWithTransformation} - win with transformation
|
|
141
134
|
*/
|
|
142
135
|
export const collectWinDetailsWithTransformation = (winsDetails, transformations, winIndex = "") => {
|
|
143
136
|
const wins = winsDetails ? [getWinFromRawResponse(winsDetails, winIndex ?? "")] : [];
|
|
@@ -2,12 +2,10 @@ import { Container, Sprite, Text } from "pixi.js";
|
|
|
2
2
|
import { Spine } from "pixi-spine";
|
|
3
3
|
/**
|
|
4
4
|
* This class represents summary and information at start of free games
|
|
5
|
-
*
|
|
6
|
-
* @export
|
|
7
5
|
* @abstract
|
|
8
6
|
* @class AbstractFreeSpinContainer
|
|
9
7
|
* @typedef {AbstractFreeSpinContainer}
|
|
10
|
-
* @
|
|
8
|
+
* @augments {Container}
|
|
11
9
|
*/
|
|
12
10
|
export declare abstract class AbstractFreeSpinContainer extends Container {
|
|
13
11
|
protected abstract freeSpinPlate: Sprite | Spine;
|
|
@@ -4,12 +4,10 @@ import { RainMan } from "../../Rainman";
|
|
|
4
4
|
import { globalMinRatio } from "../../utils";
|
|
5
5
|
/**
|
|
6
6
|
* This class represents summary and information at start of free games
|
|
7
|
-
*
|
|
8
|
-
* @export
|
|
9
7
|
* @abstract
|
|
10
8
|
* @class AbstractFreeSpinContainer
|
|
11
9
|
* @typedef {AbstractFreeSpinContainer}
|
|
12
|
-
* @
|
|
10
|
+
* @augments {Container}
|
|
13
11
|
*/
|
|
14
12
|
export class AbstractFreeSpinContainer extends Container {
|
|
15
13
|
shownAt;
|
|
@@ -12,23 +12,22 @@ import { AbstractFrame } from "../frame";
|
|
|
12
12
|
import { MessageBox } from "../messageBox";
|
|
13
13
|
/**
|
|
14
14
|
* AbstractMainContainer is a class for placing every components in game.
|
|
15
|
-
*
|
|
15
|
+
* - {@link bottomPanel} - that's the bottom panel of the game, which contains buttons for changing game settings.
|
|
16
16
|
* In each game, there's two files for this panel - `bottomPanel.png` and `bottomPanelTexture.png`
|
|
17
|
-
*
|
|
17
|
+
* - {@link frame} - is a frame that can contain additional interface elements (such as Jackpot values) there is a `frame.json`
|
|
18
18
|
* animation in each game that has an animation that should be named `frame`.
|
|
19
|
-
*
|
|
19
|
+
* - {@link _freeSpinPlate} {@link _freeSpinSummary} - modals responsible for showing information about free games (with the information how many
|
|
20
20
|
* free spins you have won) and how much you have won during free games.
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
21
|
+
* - {@link messageBox} - message box that shows information about current win, auto spins left, free spins left, incentive message, win line indicator
|
|
22
|
+
* - {@link leftButtons} {@link rightButtons} - buttons
|
|
23
|
+
* - {@link logo} - logo
|
|
24
|
+
* - {@link background} - static background
|
|
25
|
+
* - {@link animatedFront} - animated front, need to be initialized in {@link triggerStoreInitState}
|
|
26
|
+
* - {@link overlay} - overlay, used when modal is shown
|
|
27
|
+
* - {@link gambleGame} - gamble game
|
|
29
28
|
* @abstract
|
|
30
29
|
* @class AbstractMainContainer
|
|
31
|
-
* @
|
|
30
|
+
* @augments {Container}
|
|
32
31
|
*/
|
|
33
32
|
export declare abstract class AbstractMainContainer extends Container {
|
|
34
33
|
static readonly registryName = "mainContainer";
|
|
@@ -62,34 +61,32 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
62
61
|
protected constructor();
|
|
63
62
|
/**
|
|
64
63
|
* This function initializes the spines that should be paused when the battery saver is on
|
|
65
|
-
*
|
|
66
|
-
* @param {typeof RainMan.settingsStore.containersWithSpines} containersWithSpines
|
|
64
|
+
* @param {typeof RainMan.settingsStore.containersWithSpines} containersWithSpines - array of containers with spines
|
|
67
65
|
*/
|
|
68
66
|
protected triggerStoreInitState(...containersWithSpines: typeof RainMan.settingsStore.containersWithSpines): void;
|
|
69
67
|
get freeSpinPlate(): Nullable<AbstractFreeSpinContainer>;
|
|
70
68
|
get freeSpinSummary(): Nullable<AbstractFreeSpinContainer>;
|
|
71
69
|
/**
|
|
72
70
|
* Function for creating free spin container
|
|
73
|
-
*
|
|
71
|
+
* @param {() => void} _resolver - resolver for promise
|
|
72
|
+
* @param {number} _freeSpinCount - number of free spins
|
|
73
|
+
* @param {boolean} _isAdditionalFreeSpin - flag for displaying additional free spins
|
|
74
74
|
* @returns {AbstractFreeSpinContainer | null} The container for the free spin plate, or null.
|
|
75
75
|
*/
|
|
76
76
|
protected createFreeSpinPlate(_resolver: () => void, _freeSpinCount: number, _isAdditionalFreeSpin: boolean): AbstractFreeSpinContainer | null;
|
|
77
77
|
/**
|
|
78
78
|
* Function for creating bonus win container
|
|
79
|
-
*
|
|
80
79
|
* @returns {Nullable<UpdatableSpineContainer>} The container for the bonus win animation, or null.
|
|
81
80
|
*/
|
|
82
81
|
protected createBonusWinContainer(): Nullable<UpdatableSpineContainer>;
|
|
83
82
|
/**
|
|
84
83
|
* Creates a container for the super bonus win animation.
|
|
85
|
-
*
|
|
86
84
|
* @returns {UpdatableSpineContainer | null} The container for the super bonus win animation, or null.
|
|
87
85
|
*/
|
|
88
86
|
protected createSuperBonusWinContainer(): Nullable<UpdatableSpineContainer>;
|
|
89
87
|
/**
|
|
90
88
|
* Function for creating mystery win container
|
|
91
|
-
*
|
|
92
|
-
* @returns {Nullable<UpdatableSpineContainer>}
|
|
89
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the mystery win animation, or null.
|
|
93
90
|
*/
|
|
94
91
|
protected createMysteryWinContainer(): Nullable<UpdatableSpineContainer>;
|
|
95
92
|
/**
|
|
@@ -107,20 +104,20 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
107
104
|
* Function for invoking free spin plate
|
|
108
105
|
* If game draw an additional free spin, you can set isAdditionalFreeSpin to true
|
|
109
106
|
* and it will display additional free spin plate
|
|
110
|
-
*
|
|
111
107
|
* @param {number} freeSpinCount - number of free spins
|
|
112
108
|
* @param {boolean} isAdditionalFreeSpin - flag for displaying additional free spins
|
|
113
109
|
*/
|
|
114
110
|
invokeFreeSpinPlate(freeSpinCount: number, isAdditionalFreeSpin?: boolean): Promise<void>;
|
|
115
111
|
/**
|
|
116
112
|
* Function for creating free spin summary
|
|
117
|
-
*
|
|
113
|
+
* @param {void} _resolver - resolver for promise
|
|
114
|
+
* @param {number} _freeSpinCount - number of free spins
|
|
115
|
+
* @param {number} _winAmount - win amount during free spins
|
|
118
116
|
* @returns {AbstractFreeSpinContainer | null} The container for the free spin summary, or null
|
|
119
117
|
*/
|
|
120
118
|
protected createFreeSpinSummary(_resolver: () => void, _freeSpinCount: number, _winAmount: number): AbstractFreeSpinContainer | null;
|
|
121
119
|
/**
|
|
122
120
|
* Function for invoking free spin summary
|
|
123
|
-
*
|
|
124
121
|
* @param {number} freeSpinCount - amount of free spins
|
|
125
122
|
* @param {number} winAmount - win amount during free spins
|
|
126
123
|
*/
|
|
@@ -8,23 +8,22 @@ import { GambleGame } from "../GambleGame";
|
|
|
8
8
|
import { MessageBox } from "../messageBox";
|
|
9
9
|
/**
|
|
10
10
|
* AbstractMainContainer is a class for placing every components in game.
|
|
11
|
-
*
|
|
11
|
+
* - {@link bottomPanel} - that's the bottom panel of the game, which contains buttons for changing game settings.
|
|
12
12
|
* In each game, there's two files for this panel - `bottomPanel.png` and `bottomPanelTexture.png`
|
|
13
|
-
*
|
|
13
|
+
* - {@link frame} - is a frame that can contain additional interface elements (such as Jackpot values) there is a `frame.json`
|
|
14
14
|
* animation in each game that has an animation that should be named `frame`.
|
|
15
|
-
*
|
|
15
|
+
* - {@link _freeSpinPlate} {@link _freeSpinSummary} - modals responsible for showing information about free games (with the information how many
|
|
16
16
|
* free spins you have won) and how much you have won during free games.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
17
|
+
* - {@link messageBox} - message box that shows information about current win, auto spins left, free spins left, incentive message, win line indicator
|
|
18
|
+
* - {@link leftButtons} {@link rightButtons} - buttons
|
|
19
|
+
* - {@link logo} - logo
|
|
20
|
+
* - {@link background} - static background
|
|
21
|
+
* - {@link animatedFront} - animated front, need to be initialized in {@link triggerStoreInitState}
|
|
22
|
+
* - {@link overlay} - overlay, used when modal is shown
|
|
23
|
+
* - {@link gambleGame} - gamble game
|
|
25
24
|
* @abstract
|
|
26
25
|
* @class AbstractMainContainer
|
|
27
|
-
* @
|
|
26
|
+
* @augments {Container}
|
|
28
27
|
*/
|
|
29
28
|
export class AbstractMainContainer extends Container {
|
|
30
29
|
static registryName = "mainContainer";
|
|
@@ -65,8 +64,7 @@ export class AbstractMainContainer extends Container {
|
|
|
65
64
|
}
|
|
66
65
|
/**
|
|
67
66
|
* This function initializes the spines that should be paused when the battery saver is on
|
|
68
|
-
*
|
|
69
|
-
* @param {typeof RainMan.settingsStore.containersWithSpines} containersWithSpines
|
|
67
|
+
* @param {typeof RainMan.settingsStore.containersWithSpines} containersWithSpines - array of containers with spines
|
|
70
68
|
*/
|
|
71
69
|
triggerStoreInitState(...containersWithSpines) {
|
|
72
70
|
RainMan.settingsStore.containersWithSpines.push(...containersWithSpines);
|
|
@@ -80,7 +78,9 @@ export class AbstractMainContainer extends Container {
|
|
|
80
78
|
}
|
|
81
79
|
/**
|
|
82
80
|
* Function for creating free spin container
|
|
83
|
-
*
|
|
81
|
+
* @param {() => void} _resolver - resolver for promise
|
|
82
|
+
* @param {number} _freeSpinCount - number of free spins
|
|
83
|
+
* @param {boolean} _isAdditionalFreeSpin - flag for displaying additional free spins
|
|
84
84
|
* @returns {AbstractFreeSpinContainer | null} The container for the free spin plate, or null.
|
|
85
85
|
*/
|
|
86
86
|
createFreeSpinPlate(_resolver, _freeSpinCount, _isAdditionalFreeSpin) {
|
|
@@ -88,7 +88,6 @@ export class AbstractMainContainer extends Container {
|
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Function for creating bonus win container
|
|
91
|
-
*
|
|
92
91
|
* @returns {Nullable<UpdatableSpineContainer>} The container for the bonus win animation, or null.
|
|
93
92
|
*/
|
|
94
93
|
createBonusWinContainer() {
|
|
@@ -96,7 +95,6 @@ export class AbstractMainContainer extends Container {
|
|
|
96
95
|
}
|
|
97
96
|
/**
|
|
98
97
|
* Creates a container for the super bonus win animation.
|
|
99
|
-
*
|
|
100
98
|
* @returns {UpdatableSpineContainer | null} The container for the super bonus win animation, or null.
|
|
101
99
|
*/
|
|
102
100
|
createSuperBonusWinContainer() {
|
|
@@ -104,8 +102,7 @@ export class AbstractMainContainer extends Container {
|
|
|
104
102
|
}
|
|
105
103
|
/**
|
|
106
104
|
* Function for creating mystery win container
|
|
107
|
-
*
|
|
108
|
-
* @returns {Nullable<UpdatableSpineContainer>}
|
|
105
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the mystery win animation, or null.
|
|
109
106
|
*/
|
|
110
107
|
createMysteryWinContainer() {
|
|
111
108
|
return null;
|
|
@@ -125,7 +122,6 @@ export class AbstractMainContainer extends Container {
|
|
|
125
122
|
* Function for invoking free spin plate
|
|
126
123
|
* If game draw an additional free spin, you can set isAdditionalFreeSpin to true
|
|
127
124
|
* and it will display additional free spin plate
|
|
128
|
-
*
|
|
129
125
|
* @param {number} freeSpinCount - number of free spins
|
|
130
126
|
* @param {boolean} isAdditionalFreeSpin - flag for displaying additional free spins
|
|
131
127
|
*/
|
|
@@ -150,7 +146,9 @@ export class AbstractMainContainer extends Container {
|
|
|
150
146
|
}
|
|
151
147
|
/**
|
|
152
148
|
* Function for creating free spin summary
|
|
153
|
-
*
|
|
149
|
+
* @param {void} _resolver - resolver for promise
|
|
150
|
+
* @param {number} _freeSpinCount - number of free spins
|
|
151
|
+
* @param {number} _winAmount - win amount during free spins
|
|
154
152
|
* @returns {AbstractFreeSpinContainer | null} The container for the free spin summary, or null
|
|
155
153
|
*/
|
|
156
154
|
createFreeSpinSummary(_resolver, _freeSpinCount, _winAmount) {
|
|
@@ -158,7 +156,6 @@ export class AbstractMainContainer extends Container {
|
|
|
158
156
|
}
|
|
159
157
|
/**
|
|
160
158
|
* Function for invoking free spin summary
|
|
161
|
-
*
|
|
162
159
|
* @param {number} freeSpinCount - amount of free spins
|
|
163
160
|
* @param {number} winAmount - win amount during free spins
|
|
164
161
|
*/
|
|
@@ -3,11 +3,9 @@ import { Container } from "pixi.js";
|
|
|
3
3
|
* Class for representing mechanic of gamble
|
|
4
4
|
* This contains all of the buttons and cards
|
|
5
5
|
* This require adding all of the assets into the game
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
6
|
* @class GambleGame
|
|
9
7
|
* @typedef {GambleGame}
|
|
10
|
-
* @
|
|
8
|
+
* @augments {Container}
|
|
11
9
|
*/
|
|
12
10
|
export declare class GambleGame extends Container {
|
|
13
11
|
private resolver;
|
|
@@ -10,11 +10,9 @@ import { GambleUpdatableText } from "../updatable";
|
|
|
10
10
|
* Class for representing mechanic of gamble
|
|
11
11
|
* This contains all of the buttons and cards
|
|
12
12
|
* This require adding all of the assets into the game
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
13
|
* @class GambleGame
|
|
16
14
|
* @typedef {GambleGame}
|
|
17
|
-
* @
|
|
15
|
+
* @augments {Container}
|
|
18
16
|
*/
|
|
19
17
|
export class GambleGame extends Container {
|
|
20
18
|
resolver;
|
|
@@ -5,11 +5,9 @@ import { ButtonStates } from "./ButtonState";
|
|
|
5
5
|
import { TextureMap } from "./types";
|
|
6
6
|
/**
|
|
7
7
|
* Class for basic button with states and textures
|
|
8
|
-
*
|
|
9
|
-
* @export
|
|
10
8
|
* @class BaseButton
|
|
11
9
|
* @typedef {BaseButton}
|
|
12
|
-
* @
|
|
10
|
+
* @augments {Sprite}
|
|
13
11
|
*/
|
|
14
12
|
export declare class BaseButton extends Sprite {
|
|
15
13
|
protected clickSound: Nullable<SoundTrack>;
|
|
@@ -3,11 +3,9 @@ import { SoundManager, SoundTracks } from "../../../application";
|
|
|
3
3
|
import { TINT_DISABLED, TINT_ENABLED } from "../../../constants";
|
|
4
4
|
/**
|
|
5
5
|
* Class for basic button with states and textures
|
|
6
|
-
*
|
|
7
|
-
* @export
|
|
8
6
|
* @class BaseButton
|
|
9
7
|
* @typedef {BaseButton}
|
|
10
|
-
* @
|
|
8
|
+
* @augments {Sprite}
|
|
11
9
|
*/
|
|
12
10
|
export class BaseButton extends Sprite {
|
|
13
11
|
clickSound;
|
|
@@ -6,10 +6,8 @@ import { InfoButton, MoreButton, VolumeButton } from "../default";
|
|
|
6
6
|
* The class uses {@link VolumeButton}, {@link MoreButton}, {@link InfoButton}, {@link UpdatableTextComponent}
|
|
7
7
|
* to create left buttons
|
|
8
8
|
* This container have bet and credit texts
|
|
9
|
-
*
|
|
10
9
|
* @class
|
|
11
|
-
* @
|
|
12
|
-
* @export
|
|
10
|
+
* @augments {ResponsiveContainer}
|
|
13
11
|
* @document LeftButtons.md
|
|
14
12
|
*/
|
|
15
13
|
export declare class LeftButtons extends ResponsiveContainer {
|
|
@@ -10,10 +10,8 @@ import { COMPONENTS, REGISTRY } from "../registrynames";
|
|
|
10
10
|
* The class uses {@link VolumeButton}, {@link MoreButton}, {@link InfoButton}, {@link UpdatableTextComponent}
|
|
11
11
|
* to create left buttons
|
|
12
12
|
* This container have bet and credit texts
|
|
13
|
-
*
|
|
14
13
|
* @class
|
|
15
|
-
* @
|
|
16
|
-
* @export
|
|
14
|
+
* @augments {ResponsiveContainer}
|
|
17
15
|
* @document LeftButtons.md
|
|
18
16
|
*/
|
|
19
17
|
export class LeftButtons extends ResponsiveContainer {
|
|
@@ -3,7 +3,6 @@ import { ResponsiveContainer } from "../../common";
|
|
|
3
3
|
import { AutoplayButton, PlusButton, RefreshButton } from "../default";
|
|
4
4
|
/**
|
|
5
5
|
* Class for managing middle buttons in game (MOBILE ONLY). The class uses {@link AutoplayButton}, {@link PlusButton}, {@link RefreshButton}
|
|
6
|
-
*
|
|
7
6
|
*/
|
|
8
7
|
export declare class MiddleButtons extends ResponsiveContainer {
|
|
9
8
|
private landscape;
|
|
@@ -6,7 +6,6 @@ import { AutoplayButton, PlusButton, RefreshButton } from "../default";
|
|
|
6
6
|
import { REGISTRY } from "../registrynames";
|
|
7
7
|
/**
|
|
8
8
|
* Class for managing middle buttons in game (MOBILE ONLY). The class uses {@link AutoplayButton}, {@link PlusButton}, {@link RefreshButton}
|
|
9
|
-
*
|
|
10
9
|
*/
|
|
11
10
|
export class MiddleButtons extends ResponsiveContainer {
|
|
12
11
|
landscape;
|
|
@@ -4,10 +4,9 @@ import { BaseButton } from "../BaseButton";
|
|
|
4
4
|
import { AutoplayButton, NegButton, PlusButton, RefreshButton, SpeedControlButton } from "../default";
|
|
5
5
|
/**
|
|
6
6
|
* Class for managing right buttons in game. The class uses {@link AutoplayButton}, {@link NegButton}, {@link PlusButton},
|
|
7
|
-
* {@link RefreshButton}, {@link SpeedControlButton} and {@link
|
|
8
|
-
*
|
|
7
|
+
* {@link RefreshButton}, {@link SpeedControlButton} and gamble button {@link BaseButton} if exists.
|
|
9
8
|
* @class
|
|
10
|
-
* @
|
|
9
|
+
* @augments {ResponsiveContainer}
|
|
11
10
|
* @document RightButtons.md
|
|
12
11
|
*/
|
|
13
12
|
export declare class RightButtons extends ResponsiveContainer {
|
|
@@ -5,10 +5,9 @@ import { AutoplayButton, NegButton, PlusButton, RefreshButton, SpeedControlButto
|
|
|
5
5
|
import { REGISTRY } from "../registrynames";
|
|
6
6
|
/**
|
|
7
7
|
* Class for managing right buttons in game. The class uses {@link AutoplayButton}, {@link NegButton}, {@link PlusButton},
|
|
8
|
-
* {@link RefreshButton}, {@link SpeedControlButton} and {@link
|
|
9
|
-
*
|
|
8
|
+
* {@link RefreshButton}, {@link SpeedControlButton} and gamble button {@link BaseButton} if exists.
|
|
10
9
|
* @class
|
|
11
|
-
* @
|
|
10
|
+
* @augments {ResponsiveContainer}
|
|
12
11
|
* @document RightButtons.md
|
|
13
12
|
*/
|
|
14
13
|
export class RightButtons extends ResponsiveContainer {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResponsiveContainer } from "../../common";
|
|
2
2
|
import { InfoButton, MoreButton, NegButton, SpeedControlButton, VolumeButton } from "../default";
|
|
3
3
|
/**
|
|
4
|
-
* Buttons for mobile
|
|
4
|
+
* Buttons for mobile landscape. It has a settings button and game information button.
|
|
5
5
|
*/
|
|
6
6
|
export declare class RightButtonsLandscape extends ResponsiveContainer {
|
|
7
7
|
protected readonly moreButton: MoreButton;
|
|
@@ -5,7 +5,7 @@ import { InfoButton, MoreButton, NegButton, SpeedControlButton, VolumeButton } f
|
|
|
5
5
|
import { REGISTRY } from "../registrynames";
|
|
6
6
|
import { MOBILE_BUTTONS_GAP, MOBILE_PANEL_BUTTON_SCALE, MOBILE_X_OFFSET, MOBILE_Y_BOTTOM_OFFSET } from "./constants";
|
|
7
7
|
/**
|
|
8
|
-
* Buttons for mobile
|
|
8
|
+
* Buttons for mobile landscape. It has a settings button and game information button.
|
|
9
9
|
*/
|
|
10
10
|
export class RightButtonsLandscape extends ResponsiveContainer {
|
|
11
11
|
moreButton = new MoreButton(true);
|