pixi-rainman-game-engine 0.2.2 → 0.2.4
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 +1 -1
- package/dist/Rainman/types.d.ts +1 -0
- 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 +4 -5
- 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 +27 -40
- package/dist/controllers/AbstractController.js +30 -41
- 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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Interface for specifying symbols in game
|
|
3
3
|
* This type can be modified for each game in engine.d.ts file
|
|
4
|
-
*
|
|
5
4
|
* @example
|
|
6
5
|
* ```
|
|
7
6
|
* interface SymbolIds {
|
|
@@ -9,8 +8,6 @@
|
|
|
9
8
|
* lemon: "lemon",
|
|
10
9
|
* }
|
|
11
10
|
* ```
|
|
12
|
-
*
|
|
13
|
-
* @export
|
|
14
11
|
* @interface SymbolIds
|
|
15
12
|
* @typedef {SymbolIds}
|
|
16
13
|
*/
|
|
@@ -18,8 +15,6 @@ export interface SymbolIds {
|
|
|
18
15
|
}
|
|
19
16
|
/**
|
|
20
17
|
* Type for accessing symbols in game
|
|
21
|
-
*
|
|
22
|
-
* @export
|
|
23
18
|
* @typedef {SymbolId}
|
|
24
19
|
*/
|
|
25
20
|
export type SymbolId = SymbolIds[keyof SymbolIds];
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Interface for specifying transformation in game
|
|
3
3
|
* This type can be modified for each game in engine.d.ts file
|
|
4
|
-
*
|
|
5
|
-
* @export
|
|
6
4
|
* @interface SymbolIds
|
|
7
5
|
* @typedef {SymbolIds}
|
|
8
6
|
*/
|
|
@@ -10,8 +8,6 @@ export interface TransformationTypesId {
|
|
|
10
8
|
}
|
|
11
9
|
/**
|
|
12
10
|
* Type for accessing symbols in game
|
|
13
|
-
*
|
|
14
|
-
* @export
|
|
15
11
|
* @typedef {TransformationTypeId}
|
|
16
12
|
*/
|
|
17
13
|
export type TransformationTypeId = TransformationTypesId[keyof TransformationTypesId];
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
* streak: "streak";
|
|
8
8
|
* }
|
|
9
9
|
* ```
|
|
10
|
-
*
|
|
11
|
-
* @export
|
|
12
10
|
* @interface WinTypeIds
|
|
13
11
|
* @typedef {WinTypeIds}
|
|
14
12
|
*/
|
|
@@ -16,8 +14,6 @@ export interface WinTypeIds {
|
|
|
16
14
|
}
|
|
17
15
|
/**
|
|
18
16
|
* Interface for specifying symbols in game
|
|
19
|
-
*
|
|
20
|
-
* @export
|
|
21
17
|
* @typedef {WinTypeId}
|
|
22
18
|
*/
|
|
23
19
|
export type WinTypeId = WinTypeIds[keyof WinTypeIds];
|
|
@@ -14,8 +14,6 @@ export declare const SPEED_PREFIX = "speed-";
|
|
|
14
14
|
* - More Button
|
|
15
15
|
* - Autoplay Button
|
|
16
16
|
* - Volume Button
|
|
17
|
-
*
|
|
18
|
-
* @exports
|
|
19
17
|
*/
|
|
20
18
|
export declare class ButtonsEventManager {
|
|
21
19
|
private settingsPlusButton;
|
|
@@ -26,21 +24,18 @@ export declare class ButtonsEventManager {
|
|
|
26
24
|
private settingsSpeedCheetah;
|
|
27
25
|
/**
|
|
28
26
|
* Last layer invoked
|
|
29
|
-
*
|
|
30
27
|
* @memberof ButtonsEventManager
|
|
31
28
|
*/
|
|
32
29
|
private lastLayerInvoked;
|
|
33
30
|
/**
|
|
34
31
|
* Speed popup shown at for measuring time of showing speed popup
|
|
35
|
-
*
|
|
36
32
|
* @memberof ButtonsEventManager
|
|
37
33
|
*/
|
|
38
34
|
speedPopupShownAt: number;
|
|
39
35
|
/**
|
|
40
36
|
* Function for enabling/disabling buttons in game
|
|
41
|
-
*
|
|
42
|
-
* @
|
|
43
|
-
* @returns {() => void}
|
|
37
|
+
* @param {boolean} makeDisabled - flag for enabling/disabling buttons
|
|
38
|
+
* @returns {() => void} function for enabling/disabling buttons
|
|
44
39
|
*/
|
|
45
40
|
private setButtonAvailability;
|
|
46
41
|
enableButtons: () => void;
|
|
@@ -48,35 +43,30 @@ export declare class ButtonsEventManager {
|
|
|
48
43
|
constructor();
|
|
49
44
|
/**
|
|
50
45
|
* Method for initializing events in Settings UI
|
|
51
|
-
*
|
|
52
46
|
* @public
|
|
53
47
|
*/
|
|
54
48
|
initSettingsEvents(): void;
|
|
55
49
|
/**
|
|
56
50
|
* Method for setting up animated background
|
|
57
|
-
*
|
|
58
51
|
* @public
|
|
59
52
|
*/
|
|
60
53
|
setUpUIElementsInteractivity(): void;
|
|
61
54
|
/**
|
|
62
55
|
* Method for initializing Plus button
|
|
63
56
|
* This method changes bet in game based on given strategy
|
|
64
|
-
*
|
|
65
57
|
* @public
|
|
66
|
-
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback
|
|
58
|
+
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback - callback for setting bet
|
|
67
59
|
*/
|
|
68
60
|
initBetPlusButtonEvent(setBetCallback: (strategy: "first" | "increase" | "decrease") => void): void;
|
|
69
61
|
/**
|
|
70
62
|
* Method for initializing Neg button
|
|
71
63
|
* This method changes bet in game based on given strategy
|
|
72
|
-
*
|
|
73
64
|
* @public
|
|
74
|
-
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback
|
|
65
|
+
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback - callback for setting bet
|
|
75
66
|
*/
|
|
76
67
|
initBetMinusButtonEvent(setBetCallback: (strategy: "first" | "increase" | "decrease") => void): void;
|
|
77
68
|
/**
|
|
78
69
|
* Method for enabling ability to buy free spins in game
|
|
79
|
-
*
|
|
80
70
|
* @public
|
|
81
71
|
*/
|
|
82
72
|
initFreeSpinModal(): void;
|
|
@@ -84,72 +74,61 @@ export declare class ButtonsEventManager {
|
|
|
84
74
|
* Method for initializing volume button
|
|
85
75
|
* This method changes texture of Volume button based on volume level
|
|
86
76
|
* If music was muted, it will be resumed
|
|
87
|
-
*
|
|
88
77
|
* @public
|
|
89
78
|
*/
|
|
90
79
|
initVolumeButtonEvent(): void;
|
|
91
80
|
/**
|
|
92
81
|
* Method for initializing button with information about mechanics in game
|
|
93
|
-
*
|
|
94
82
|
* @public
|
|
95
83
|
*/
|
|
96
84
|
initInfoButtonEvent(): void;
|
|
97
85
|
/**
|
|
98
86
|
* Method for initializing more button
|
|
99
|
-
*
|
|
100
87
|
* @public
|
|
101
88
|
*/
|
|
102
89
|
initMoreButtonEvent(): void;
|
|
103
90
|
/**
|
|
104
91
|
* Method for initializing Autoplay button
|
|
105
|
-
*
|
|
106
92
|
* @public
|
|
107
93
|
*/
|
|
108
94
|
initAutoplayButtonEvent(): void;
|
|
109
95
|
/**
|
|
110
96
|
* Initializing gamble game button
|
|
111
|
-
*
|
|
112
97
|
* @public
|
|
113
|
-
* @param {() => void} onClick
|
|
114
|
-
* @param {boolean} disabled
|
|
98
|
+
* @param {() => void} onClick - callback for gamble game
|
|
99
|
+
* @param {boolean} disabled - flag for enabling/disabling button
|
|
115
100
|
*/
|
|
116
101
|
initGambleButton(onClick: () => void, disabled: boolean): void;
|
|
117
102
|
/**
|
|
118
103
|
* Function for displaying speed modal
|
|
119
104
|
* This modal is used while doing turbo spin
|
|
120
|
-
*
|
|
121
105
|
* @public
|
|
122
|
-
* @param {("flex" | "none")} displayValue
|
|
106
|
+
* @param {("flex" | "none")} displayValue - flag for displaying modal
|
|
123
107
|
*/
|
|
124
108
|
setSpeedPopupVisibility(displayValue: "flex" | "none"): void;
|
|
125
109
|
/**
|
|
126
110
|
* Function for handling autostart conformation
|
|
127
|
-
*
|
|
128
111
|
* @public
|
|
129
|
-
* @param {() => void} confirmAutoplayButtonCallback
|
|
112
|
+
* @param {() => void} confirmAutoplayButtonCallback - callback for confirming autoplay
|
|
130
113
|
*/
|
|
131
114
|
setConfirmAutoplayButton(confirmAutoplayButtonCallback: () => void): void;
|
|
132
115
|
/**
|
|
133
116
|
* Getter for displayed modal
|
|
134
|
-
*
|
|
135
117
|
* @public
|
|
136
|
-
* @returns {Nullable<HTMLElement>}
|
|
118
|
+
* @returns {Nullable<HTMLElement>} - displayed modal
|
|
137
119
|
*/
|
|
138
120
|
getInvokedSettingItem(): Nullable<HTMLElement>;
|
|
139
121
|
/**
|
|
140
122
|
* Function for disabling action while on given promise
|
|
141
|
-
*
|
|
142
123
|
* @public
|
|
143
|
-
* @
|
|
144
|
-
* @param {() => Promise<void>} actionToWait
|
|
124
|
+
* @param {() => Promise<void>} actionToWait - action to wait
|
|
145
125
|
* @returns {Promise<void>}
|
|
146
126
|
*/
|
|
147
127
|
disableButtonsForAction(actionToWait: () => Promise<void>): Promise<void>;
|
|
148
128
|
/**
|
|
149
129
|
* Function for displaying modal layer with given name
|
|
150
|
-
*
|
|
151
130
|
* @private
|
|
152
|
-
* @param {string} layerName
|
|
131
|
+
* @param {string} layerName - name of layer
|
|
153
132
|
*/
|
|
154
133
|
private handleModalInvocation;
|
|
155
134
|
private checkAnyLayerIsPresent;
|
|
@@ -20,8 +20,6 @@ export const SPEED_PREFIX = "speed-";
|
|
|
20
20
|
* - More Button
|
|
21
21
|
* - Autoplay Button
|
|
22
22
|
* - Volume Button
|
|
23
|
-
*
|
|
24
|
-
* @exports
|
|
25
23
|
*/
|
|
26
24
|
export class ButtonsEventManager {
|
|
27
25
|
settingsPlusButton = null;
|
|
@@ -32,21 +30,18 @@ export class ButtonsEventManager {
|
|
|
32
30
|
settingsSpeedCheetah = null;
|
|
33
31
|
/**
|
|
34
32
|
* Last layer invoked
|
|
35
|
-
*
|
|
36
33
|
* @memberof ButtonsEventManager
|
|
37
34
|
*/
|
|
38
35
|
lastLayerInvoked = "";
|
|
39
36
|
/**
|
|
40
37
|
* Speed popup shown at for measuring time of showing speed popup
|
|
41
|
-
*
|
|
42
38
|
* @memberof ButtonsEventManager
|
|
43
39
|
*/
|
|
44
40
|
speedPopupShownAt = 0;
|
|
45
41
|
/**
|
|
46
42
|
* Function for enabling/disabling buttons in game
|
|
47
|
-
*
|
|
48
|
-
* @
|
|
49
|
-
* @returns {() => void}
|
|
43
|
+
* @param {boolean} makeDisabled - flag for enabling/disabling buttons
|
|
44
|
+
* @returns {() => void} function for enabling/disabling buttons
|
|
50
45
|
*/
|
|
51
46
|
setButtonAvailability = (makeDisabled) => () => {
|
|
52
47
|
const buttonsToDisable = [SpeedControlButton.registryName, BUTTONS.neg, BUTTONS.plus];
|
|
@@ -61,7 +56,6 @@ export class ButtonsEventManager {
|
|
|
61
56
|
}
|
|
62
57
|
/**
|
|
63
58
|
* Method for initializing events in Settings UI
|
|
64
|
-
*
|
|
65
59
|
* @public
|
|
66
60
|
*/
|
|
67
61
|
initSettingsEvents() {
|
|
@@ -130,7 +124,6 @@ export class ButtonsEventManager {
|
|
|
130
124
|
}
|
|
131
125
|
/**
|
|
132
126
|
* Method for setting up animated background
|
|
133
|
-
*
|
|
134
127
|
* @public
|
|
135
128
|
*/
|
|
136
129
|
setUpUIElementsInteractivity() {
|
|
@@ -145,9 +138,8 @@ export class ButtonsEventManager {
|
|
|
145
138
|
/**
|
|
146
139
|
* Method for initializing Plus button
|
|
147
140
|
* This method changes bet in game based on given strategy
|
|
148
|
-
*
|
|
149
141
|
* @public
|
|
150
|
-
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback
|
|
142
|
+
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback - callback for setting bet
|
|
151
143
|
*/
|
|
152
144
|
initBetPlusButtonEvent(setBetCallback) {
|
|
153
145
|
if (this.settingsPlusButton === null) {
|
|
@@ -160,9 +152,8 @@ export class ButtonsEventManager {
|
|
|
160
152
|
/**
|
|
161
153
|
* Method for initializing Neg button
|
|
162
154
|
* This method changes bet in game based on given strategy
|
|
163
|
-
*
|
|
164
155
|
* @public
|
|
165
|
-
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback
|
|
156
|
+
* @param {(strategy: "first" | "increase" | "decrease") => void} setBetCallback - callback for setting bet
|
|
166
157
|
*/
|
|
167
158
|
initBetMinusButtonEvent(setBetCallback) {
|
|
168
159
|
if (this.settingsMinusButton === null) {
|
|
@@ -174,7 +165,6 @@ export class ButtonsEventManager {
|
|
|
174
165
|
}
|
|
175
166
|
/**
|
|
176
167
|
* Method for enabling ability to buy free spins in game
|
|
177
|
-
*
|
|
178
168
|
* @public
|
|
179
169
|
*/
|
|
180
170
|
initFreeSpinModal() {
|
|
@@ -186,7 +176,6 @@ export class ButtonsEventManager {
|
|
|
186
176
|
* Method for initializing volume button
|
|
187
177
|
* This method changes texture of Volume button based on volume level
|
|
188
178
|
* If music was muted, it will be resumed
|
|
189
|
-
*
|
|
190
179
|
* @public
|
|
191
180
|
*/
|
|
192
181
|
initVolumeButtonEvent() {
|
|
@@ -201,7 +190,6 @@ export class ButtonsEventManager {
|
|
|
201
190
|
}
|
|
202
191
|
/**
|
|
203
192
|
* Method for initializing button with information about mechanics in game
|
|
204
|
-
*
|
|
205
193
|
* @public
|
|
206
194
|
*/
|
|
207
195
|
initInfoButtonEvent() {
|
|
@@ -214,7 +202,6 @@ export class ButtonsEventManager {
|
|
|
214
202
|
}
|
|
215
203
|
/**
|
|
216
204
|
* Method for initializing more button
|
|
217
|
-
*
|
|
218
205
|
* @public
|
|
219
206
|
*/
|
|
220
207
|
initMoreButtonEvent() {
|
|
@@ -227,7 +214,6 @@ export class ButtonsEventManager {
|
|
|
227
214
|
}
|
|
228
215
|
/**
|
|
229
216
|
* Method for initializing Autoplay button
|
|
230
|
-
*
|
|
231
217
|
* @public
|
|
232
218
|
*/
|
|
233
219
|
initAutoplayButtonEvent() {
|
|
@@ -248,10 +234,9 @@ export class ButtonsEventManager {
|
|
|
248
234
|
}
|
|
249
235
|
/**
|
|
250
236
|
* Initializing gamble game button
|
|
251
|
-
*
|
|
252
237
|
* @public
|
|
253
|
-
* @param {() => void} onClick
|
|
254
|
-
* @param {boolean} disabled
|
|
238
|
+
* @param {() => void} onClick - callback for gamble game
|
|
239
|
+
* @param {boolean} disabled - flag for enabling/disabling button
|
|
255
240
|
*/
|
|
256
241
|
initGambleButton(onClick, disabled) {
|
|
257
242
|
if (!RainMan.componentRegistry.has(BUTTONS.gamble))
|
|
@@ -262,9 +247,8 @@ export class ButtonsEventManager {
|
|
|
262
247
|
/**
|
|
263
248
|
* Function for displaying speed modal
|
|
264
249
|
* This modal is used while doing turbo spin
|
|
265
|
-
*
|
|
266
250
|
* @public
|
|
267
|
-
* @param {("flex" | "none")} displayValue
|
|
251
|
+
* @param {("flex" | "none")} displayValue - flag for displaying modal
|
|
268
252
|
*/
|
|
269
253
|
setSpeedPopupVisibility(displayValue) {
|
|
270
254
|
if (displayValue === "flex")
|
|
@@ -277,9 +261,8 @@ export class ButtonsEventManager {
|
|
|
277
261
|
}
|
|
278
262
|
/**
|
|
279
263
|
* Function for handling autostart conformation
|
|
280
|
-
*
|
|
281
264
|
* @public
|
|
282
|
-
* @param {() => void} confirmAutoplayButtonCallback
|
|
265
|
+
* @param {() => void} confirmAutoplayButtonCallback - callback for confirming autoplay
|
|
283
266
|
*/
|
|
284
267
|
setConfirmAutoplayButton(confirmAutoplayButtonCallback) {
|
|
285
268
|
const confirmAutoplayButton = window.document.getElementById(COMPONENTS.autoSpinConfirm);
|
|
@@ -292,9 +275,8 @@ export class ButtonsEventManager {
|
|
|
292
275
|
}
|
|
293
276
|
/**
|
|
294
277
|
* Getter for displayed modal
|
|
295
|
-
*
|
|
296
278
|
* @public
|
|
297
|
-
* @returns {Nullable<HTMLElement>}
|
|
279
|
+
* @returns {Nullable<HTMLElement>} - displayed modal
|
|
298
280
|
*/
|
|
299
281
|
getInvokedSettingItem() {
|
|
300
282
|
for (const itemId of allUiItems) {
|
|
@@ -307,10 +289,8 @@ export class ButtonsEventManager {
|
|
|
307
289
|
}
|
|
308
290
|
/**
|
|
309
291
|
* Function for disabling action while on given promise
|
|
310
|
-
*
|
|
311
292
|
* @public
|
|
312
|
-
* @
|
|
313
|
-
* @param {() => Promise<void>} actionToWait
|
|
293
|
+
* @param {() => Promise<void>} actionToWait - action to wait
|
|
314
294
|
* @returns {Promise<void>}
|
|
315
295
|
*/
|
|
316
296
|
async disableButtonsForAction(actionToWait) {
|
|
@@ -320,9 +300,8 @@ export class ButtonsEventManager {
|
|
|
320
300
|
}
|
|
321
301
|
/**
|
|
322
302
|
* Function for displaying modal layer with given name
|
|
323
|
-
*
|
|
324
303
|
* @private
|
|
325
|
-
* @param {string} layerName
|
|
304
|
+
* @param {string} layerName - name of layer
|
|
326
305
|
*/
|
|
327
306
|
handleModalInvocation(layerName) {
|
|
328
307
|
if (this.checkAnyLayerIsPresent(layerName))
|
|
@@ -6,7 +6,6 @@ export declare const pixiSoundContext: typeof sound.context;
|
|
|
6
6
|
* Class for managing sound in game, uses the pixi sound library
|
|
7
7
|
* The class uses SoundTrack enum to access specified sounds
|
|
8
8
|
*
|
|
9
|
-
* @exports
|
|
10
9
|
*/
|
|
11
10
|
export declare class SoundManagerInstance implements SpeedAdapterInterface<SoundOverrides> {
|
|
12
11
|
private static instance;
|
|
@@ -17,15 +16,12 @@ export declare class SoundManagerInstance implements SpeedAdapterInterface<Sound
|
|
|
17
16
|
constructor();
|
|
18
17
|
/**
|
|
19
18
|
* Function for loading sounds into pixi
|
|
20
|
-
*
|
|
21
|
-
* @async
|
|
22
|
-
* @param {Record<string, string>} assets
|
|
19
|
+
* @param {Record<string, string>} assets - sound assets
|
|
23
20
|
*/
|
|
24
21
|
loadSounds(assets: Record<string, string>): Promise<void>;
|
|
25
22
|
/**
|
|
26
23
|
* Function for setting volume level for each sound in game
|
|
27
|
-
*
|
|
28
|
-
* @param {number} volumeLevel
|
|
24
|
+
* @param {number} volumeLevel - volume level from 0-1
|
|
29
25
|
*/
|
|
30
26
|
setVolume(volumeLevel: number): void;
|
|
31
27
|
/**
|
|
@@ -34,15 +30,13 @@ export declare class SoundManagerInstance implements SpeedAdapterInterface<Sound
|
|
|
34
30
|
stopPlayingFxSounds(): void;
|
|
35
31
|
/**
|
|
36
32
|
* Function for resuming and pausing sound in game
|
|
37
|
-
*
|
|
38
|
-
* @param {
|
|
39
|
-
* @param {boolean} flag
|
|
33
|
+
* @param {SoundTrack} soundName - sound name
|
|
34
|
+
* @param {boolean} flag - flag for playing or pausing sound
|
|
40
35
|
*/
|
|
41
36
|
setPlayStatus(soundName: SoundTrack, flag: boolean): void;
|
|
42
37
|
/**
|
|
43
38
|
* Function for playing sound with given name
|
|
44
|
-
*
|
|
45
|
-
* @param {SoundTrack} soundName
|
|
39
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
46
40
|
*/
|
|
47
41
|
play(soundName: SoundTrack): void;
|
|
48
42
|
/**
|
|
@@ -57,25 +51,21 @@ export declare class SoundManagerInstance implements SpeedAdapterInterface<Sound
|
|
|
57
51
|
pauseAll(): void;
|
|
58
52
|
/**
|
|
59
53
|
* Function for pausing sound with given name
|
|
60
|
-
*
|
|
61
|
-
* @param {SoundTrack} soundName
|
|
54
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
62
55
|
*/
|
|
63
56
|
pause(soundName: SoundTrack): void;
|
|
64
57
|
/**
|
|
65
58
|
* Function for resuming sound with given name
|
|
66
|
-
*
|
|
67
|
-
* @param {SoundTrack} soundName
|
|
59
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
68
60
|
*/
|
|
69
61
|
resume(soundName: SoundTrack): void;
|
|
70
62
|
/**
|
|
71
63
|
* Function for adapting sound into the speed of animations
|
|
72
|
-
*
|
|
73
|
-
* @param {SpeedLevel} speedLevel
|
|
64
|
+
* @param {SpeedLevel} speedLevel - speed level
|
|
74
65
|
*/
|
|
75
66
|
adaptToSpeed(speedLevel: SpeedLevel): void;
|
|
76
67
|
/**
|
|
77
68
|
* Function for stopping sound with given name
|
|
78
|
-
*
|
|
79
69
|
* @param {SoundTrack} soundName - name of the sound
|
|
80
70
|
*/
|
|
81
71
|
stop(soundName: SoundTrack): void;
|
|
@@ -7,7 +7,6 @@ export const pixiSoundContext = sound.context;
|
|
|
7
7
|
* Class for managing sound in game, uses the pixi sound library
|
|
8
8
|
* The class uses SoundTrack enum to access specified sounds
|
|
9
9
|
*
|
|
10
|
-
* @exports
|
|
11
10
|
*/
|
|
12
11
|
export class SoundManagerInstance {
|
|
13
12
|
static instance;
|
|
@@ -29,9 +28,7 @@ export class SoundManagerInstance {
|
|
|
29
28
|
}
|
|
30
29
|
/**
|
|
31
30
|
* Function for loading sounds into pixi
|
|
32
|
-
*
|
|
33
|
-
* @async
|
|
34
|
-
* @param {Record<string, string>} assets
|
|
31
|
+
* @param {Record<string, string>} assets - sound assets
|
|
35
32
|
*/
|
|
36
33
|
async loadSounds(assets) {
|
|
37
34
|
const loadingSoundsPromises = [];
|
|
@@ -52,8 +49,7 @@ export class SoundManagerInstance {
|
|
|
52
49
|
}
|
|
53
50
|
/**
|
|
54
51
|
* Function for setting volume level for each sound in game
|
|
55
|
-
*
|
|
56
|
-
* @param {number} volumeLevel
|
|
52
|
+
* @param {number} volumeLevel - volume level from 0-1
|
|
57
53
|
*/
|
|
58
54
|
setVolume(volumeLevel) {
|
|
59
55
|
this.musicCatalogue.forEach((sound) => (sound.volume = volumeLevel));
|
|
@@ -70,17 +66,15 @@ export class SoundManagerInstance {
|
|
|
70
66
|
}
|
|
71
67
|
/**
|
|
72
68
|
* Function for resuming and pausing sound in game
|
|
73
|
-
*
|
|
74
|
-
* @param {
|
|
75
|
-
* @param {boolean} flag
|
|
69
|
+
* @param {SoundTrack} soundName - sound name
|
|
70
|
+
* @param {boolean} flag - flag for playing or pausing sound
|
|
76
71
|
*/
|
|
77
72
|
setPlayStatus(soundName, flag) {
|
|
78
73
|
flag ? this.play(soundName) : this.pause(soundName);
|
|
79
74
|
}
|
|
80
75
|
/**
|
|
81
76
|
* Function for playing sound with given name
|
|
82
|
-
*
|
|
83
|
-
* @param {SoundTrack} soundName
|
|
77
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
84
78
|
*/
|
|
85
79
|
play(soundName) {
|
|
86
80
|
if (!RainMan.settingsStore.soundFxFlag)
|
|
@@ -117,31 +111,27 @@ export class SoundManagerInstance {
|
|
|
117
111
|
}
|
|
118
112
|
/**
|
|
119
113
|
* Function for pausing sound with given name
|
|
120
|
-
*
|
|
121
|
-
* @param {SoundTrack} soundName
|
|
114
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
122
115
|
*/
|
|
123
116
|
pause(soundName) {
|
|
124
117
|
this.musicCatalogue.get(soundName)?.pause();
|
|
125
118
|
}
|
|
126
119
|
/**
|
|
127
120
|
* Function for resuming sound with given name
|
|
128
|
-
*
|
|
129
|
-
* @param {SoundTrack} soundName
|
|
121
|
+
* @param {SoundTrack} soundName - name of the sound
|
|
130
122
|
*/
|
|
131
123
|
resume(soundName) {
|
|
132
124
|
this.musicCatalogue.get(soundName)?.resume();
|
|
133
125
|
}
|
|
134
126
|
/**
|
|
135
127
|
* Function for adapting sound into the speed of animations
|
|
136
|
-
*
|
|
137
|
-
* @param {SpeedLevel} speedLevel
|
|
128
|
+
* @param {SpeedLevel} speedLevel - speed level
|
|
138
129
|
*/
|
|
139
130
|
adaptToSpeed(speedLevel) {
|
|
140
131
|
this.overrides = this.speedLevelMapper[speedLevel];
|
|
141
132
|
}
|
|
142
133
|
/**
|
|
143
134
|
* Function for stopping sound with given name
|
|
144
|
-
*
|
|
145
135
|
* @param {SoundTrack} soundName - name of the sound
|
|
146
136
|
*/
|
|
147
137
|
stop(soundName) {
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
* @property {string} mediumWin - on medium win - this sound is played when win of all streaks is more than x1.1 * bet and less than x5 * bet
|
|
27
27
|
* @property {string} highWin - on high win - this sound is played when win of all streaks is more than x5.1 * bet and less than x15 * bet
|
|
28
28
|
* @property {string} veryHighWin - on very high win - this sound is played when win of all streaks is more than x15.1 * bet
|
|
29
|
-
*
|
|
30
|
-
* @exports SoundTracks
|
|
29
|
+
* @typedef {SoundTracks}
|
|
31
30
|
*/
|
|
32
31
|
export declare const SoundTracks: SoundTracks;
|
|
33
32
|
export interface SoundTracks {
|
|
@@ -84,7 +83,6 @@ export type SoundTrack = SoundTracks[keyof SoundTracks];
|
|
|
84
83
|
export type GameSoundAssets = Record<SoundTrack, string>;
|
|
85
84
|
/**
|
|
86
85
|
* Type for overriding sound tracks in game
|
|
87
|
-
*
|
|
88
|
-
* @exports SoundOverrides
|
|
86
|
+
* @typedef {SoundOverrides}
|
|
89
87
|
*/
|
|
90
88
|
export type SoundOverrides = Partial<Record<SoundTrack, SoundTrack>>;
|
|
@@ -26,8 +26,7 @@
|
|
|
26
26
|
* @property {string} mediumWin - on medium win - this sound is played when win of all streaks is more than x1.1 * bet and less than x5 * bet
|
|
27
27
|
* @property {string} highWin - on high win - this sound is played when win of all streaks is more than x5.1 * bet and less than x15 * bet
|
|
28
28
|
* @property {string} veryHighWin - on very high win - this sound is played when win of all streaks is more than x15.1 * bet
|
|
29
|
-
*
|
|
30
|
-
* @exports SoundTracks
|
|
29
|
+
* @typedef {SoundTracks}
|
|
31
30
|
*/
|
|
32
31
|
export const SoundTracks = {
|
|
33
32
|
button: "button",
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { SpeedLevel } from "./SpeedLevel";
|
|
2
2
|
/**
|
|
3
3
|
* Class for handling speed levels
|
|
4
|
-
*
|
|
5
|
-
* @export SpeedLevelHandler
|
|
6
4
|
*/
|
|
7
5
|
export declare class SpeedLevelHandler {
|
|
8
6
|
private chosenSpeedLevel;
|
|
@@ -10,21 +8,18 @@ export declare class SpeedLevelHandler {
|
|
|
10
8
|
static defaultSpeedLevel: SpeedLevel;
|
|
11
9
|
/**
|
|
12
10
|
* Function for initializing SpeedLevelHandler with default speed levels
|
|
13
|
-
*
|
|
14
11
|
* @returns {SpeedLevelHandler} instance of SpeedLevelHandler with default speed levels
|
|
15
12
|
*/
|
|
16
13
|
static initWithDefaultSpeedLevels(): SpeedLevelHandler;
|
|
17
14
|
constructor(chosenSpeedLevel: number, speedLevels: SpeedLevel[]);
|
|
18
15
|
/**
|
|
19
16
|
* Getter for current speed level
|
|
20
|
-
*
|
|
21
17
|
* @returns {SpeedLevel} current speed level
|
|
22
18
|
*/
|
|
23
19
|
get currentSpeed(): SpeedLevel;
|
|
24
20
|
/**
|
|
25
21
|
* Setter for speed level
|
|
26
|
-
*
|
|
27
|
-
* @param newSpeedLevel
|
|
22
|
+
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
28
23
|
*/
|
|
29
24
|
setSpeed(newSpeedLevel: SpeedLevel): void;
|
|
30
25
|
/**
|
|
@@ -33,8 +28,7 @@ export declare class SpeedLevelHandler {
|
|
|
33
28
|
nextSpeed(): void;
|
|
34
29
|
/**
|
|
35
30
|
* Helper function for checking if speed options loop should be reset
|
|
36
|
-
*
|
|
37
|
-
* @returns {boolean}
|
|
31
|
+
* @returns {boolean} - true if speed options loop should be reset
|
|
38
32
|
*/
|
|
39
33
|
private shouldResetSpeedOptionsLoop;
|
|
40
34
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_SPEED, SPEED_LEVELS } from "./SpeedLevel";
|
|
2
2
|
/**
|
|
3
3
|
* Class for handling speed levels
|
|
4
|
-
*
|
|
5
|
-
* @export SpeedLevelHandler
|
|
6
4
|
*/
|
|
7
5
|
export class SpeedLevelHandler {
|
|
8
6
|
chosenSpeedLevel;
|
|
@@ -10,7 +8,6 @@ export class SpeedLevelHandler {
|
|
|
10
8
|
static defaultSpeedLevel = DEFAULT_SPEED;
|
|
11
9
|
/**
|
|
12
10
|
* Function for initializing SpeedLevelHandler with default speed levels
|
|
13
|
-
*
|
|
14
11
|
* @returns {SpeedLevelHandler} instance of SpeedLevelHandler with default speed levels
|
|
15
12
|
*/
|
|
16
13
|
static initWithDefaultSpeedLevels() {
|
|
@@ -24,7 +21,6 @@ export class SpeedLevelHandler {
|
|
|
24
21
|
}
|
|
25
22
|
/**
|
|
26
23
|
* Getter for current speed level
|
|
27
|
-
*
|
|
28
24
|
* @returns {SpeedLevel} current speed level
|
|
29
25
|
*/
|
|
30
26
|
get currentSpeed() {
|
|
@@ -32,8 +28,7 @@ export class SpeedLevelHandler {
|
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
34
30
|
* Setter for speed level
|
|
35
|
-
*
|
|
36
|
-
* @param newSpeedLevel
|
|
31
|
+
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
37
32
|
*/
|
|
38
33
|
setSpeed(newSpeedLevel) {
|
|
39
34
|
switch (newSpeedLevel) {
|
|
@@ -62,8 +57,7 @@ export class SpeedLevelHandler {
|
|
|
62
57
|
}
|
|
63
58
|
/**
|
|
64
59
|
* Helper function for checking if speed options loop should be reset
|
|
65
|
-
*
|
|
66
|
-
* @returns {boolean}
|
|
60
|
+
* @returns {boolean} - true if speed options loop should be reset
|
|
67
61
|
*/
|
|
68
62
|
shouldResetSpeedOptionsLoop() {
|
|
69
63
|
return this.chosenSpeedLevel === this.speedLevels.length - 1;
|