pixi-rainman-game-engine 0.2.27 → 0.2.29
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.js +2 -2
- package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.js +1 -1
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +10 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +25 -2
- package/dist/application/SoundManager/SoundManager.js +23 -7
- package/dist/application/SoundManager/types.d.ts +2 -0
- package/dist/application/SoundManager/types.js +2 -0
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +2 -2
- package/dist/components/buttons/BaseButton/BaseButton.js +2 -0
- package/dist/components/frame/AbstractColumnsContainer.d.ts +104 -0
- package/dist/components/frame/AbstractColumnsContainer.js +98 -4
- package/dist/components/messageBox/MessageBox.d.ts +62 -0
- package/dist/components/messageBox/MessageBox.js +84 -14
- package/dist/components/symbols/AbstractSymbolBase.js +8 -2
- package/dist/connectivity/ConnectionWrapper.d.ts +15 -1
- package/dist/connectivity/ConnectionWrapper.js +42 -0
- package/dist/connectivity/LocalConnectionWrapper.d.ts +3 -1
- package/dist/connectivity/LocalConnectionWrapper.js +19 -0
- package/dist/connectivity/serverConnection.d.ts +13 -3
- package/dist/connectivity/serverData.d.ts +27 -0
- package/dist/controllers/AbstractController.d.ts +6 -0
- package/dist/controllers/AbstractController.js +46 -13
- package/dist/controllers/QuickStopController.d.ts +34 -1
- package/dist/controllers/QuickStopController.js +38 -2
- package/dist/stores/SettingsStore.d.ts +2 -0
- package/dist/stores/SettingsStore.js +3 -1
- package/package.json +1 -1
|
@@ -24,7 +24,7 @@ export class ComponentRegistry {
|
|
|
24
24
|
*/
|
|
25
25
|
setTemporarySpeedLevel(newSpeedLevel) {
|
|
26
26
|
this.speedLevelHandler.setSpeed(newSpeedLevel);
|
|
27
|
-
this.updateAllSpeedAdaptable(
|
|
27
|
+
this.updateAllSpeedAdaptable(newSpeedLevel);
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Method for reverting speed level for turbo spin
|
|
@@ -32,7 +32,7 @@ export class ComponentRegistry {
|
|
|
32
32
|
*/
|
|
33
33
|
revertTemporarySpeedLevel() {
|
|
34
34
|
this.speedLevelHandler.setSpeed(RainMan.settingsStore.currentSpeed);
|
|
35
|
-
this.updateAllSpeedAdaptable(
|
|
35
|
+
this.updateAllSpeedAdaptable(RainMan.settingsStore.currentSpeed);
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Setter fo speed level
|
|
@@ -5,7 +5,7 @@ export const useBuyFreeSpinOptions = () => {
|
|
|
5
5
|
const [options, setOptions] = useState([]);
|
|
6
6
|
useEffect(() => {
|
|
7
7
|
const disposer = autorun(() => {
|
|
8
|
-
setOptions(Object.entries(RainMan.settingsStore.freeSpinBuyTable).map(([amount, multiplier]) => ({
|
|
8
|
+
setOptions(Object.entries(RainMan.settingsStore.freeSpinBuyTable ?? {}).map(([amount, multiplier]) => ({
|
|
9
9
|
amount: parseInt(amount, 10),
|
|
10
10
|
price: multiplier
|
|
11
11
|
})));
|
|
@@ -131,5 +131,15 @@ export declare class ButtonsEventManager {
|
|
|
131
131
|
* @param {string} layerName - name of layer
|
|
132
132
|
*/
|
|
133
133
|
private handleModalInvocation;
|
|
134
|
+
/**
|
|
135
|
+
* Function for closing all other modals except the one with given name
|
|
136
|
+
* @param {string} activeLayerName - name of the layer that should remain open
|
|
137
|
+
*/
|
|
138
|
+
private closeOtherModals;
|
|
139
|
+
/**
|
|
140
|
+
* Function for checking if any layer is present except the one with given name
|
|
141
|
+
* @param {string} layerName - name of layer to check
|
|
142
|
+
* @returns {boolean} - true if any other layer is present, false otherwise
|
|
143
|
+
*/
|
|
134
144
|
private checkAnyLayerIsPresent;
|
|
135
145
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i18n from "i18next";
|
|
2
2
|
import { sample } from "lodash";
|
|
3
|
-
import { SoundManager } from "../../application";
|
|
3
|
+
import { SoundManager, SoundTracks } from "../../application";
|
|
4
4
|
import { AutoplayButton, Background, BUTTONS, COMPONENTS, FreeSpinButton, MessageBox, SpeedControlButton, VolumeButton } from "../../components";
|
|
5
5
|
import { RainMan } from "../../Rainman";
|
|
6
6
|
import { allUiItems, hideLayerIfPresent, UI_ITEMS, wait } from "../../utils";
|
|
@@ -199,7 +199,7 @@ export class ButtonsEventManager {
|
|
|
199
199
|
if (RainMan.settingsStore.isSoundEnabled()) {
|
|
200
200
|
SoundManager.resumeAll();
|
|
201
201
|
if (RainMan.settingsStore.shouldPlayAmbientMusic) {
|
|
202
|
-
SoundManager.setPlayStatus(
|
|
202
|
+
SoundManager.setPlayStatus(RainMan.settingsStore.isFreeSpinsPlayEnabled ? SoundTracks.freeSpinsMusic : SoundTracks.music, RainMan.settingsStore.shouldPlayAmbientMusic);
|
|
203
203
|
}
|
|
204
204
|
}
|
|
205
205
|
RainMan.componentRegistry.get(VolumeButton.registryName).changeTextureDependOnVolume();
|
|
@@ -327,6 +327,9 @@ export class ButtonsEventManager {
|
|
|
327
327
|
handleModalInvocation(layerName) {
|
|
328
328
|
if (this.checkAnyLayerIsPresent(layerName) && RainMan.globals.shouldShowModals)
|
|
329
329
|
return;
|
|
330
|
+
if (this.checkAnyLayerIsPresent(layerName)) {
|
|
331
|
+
this.closeOtherModals(layerName);
|
|
332
|
+
}
|
|
330
333
|
const layer = window.document.getElementById(layerName);
|
|
331
334
|
if (layer !== null) {
|
|
332
335
|
if (layer.style.display !== "flex") {
|
|
@@ -339,6 +342,26 @@ export class ButtonsEventManager {
|
|
|
339
342
|
}
|
|
340
343
|
}
|
|
341
344
|
}
|
|
345
|
+
/**
|
|
346
|
+
* Function for closing all other modals except the one with given name
|
|
347
|
+
* @param {string} activeLayerName - name of the layer that should remain open
|
|
348
|
+
*/
|
|
349
|
+
closeOtherModals(activeLayerName) {
|
|
350
|
+
for (const itemId of allUiItems) {
|
|
351
|
+
if (itemId === activeLayerName) {
|
|
352
|
+
continue;
|
|
353
|
+
}
|
|
354
|
+
const layer = window.document.getElementById(itemId);
|
|
355
|
+
if (layer !== null && layer.style.display === "flex") {
|
|
356
|
+
layer.style.display = "none";
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
/**
|
|
361
|
+
* Function for checking if any layer is present except the one with given name
|
|
362
|
+
* @param {string} layerName - name of layer to check
|
|
363
|
+
* @returns {boolean} - true if any other layer is present, false otherwise
|
|
364
|
+
*/
|
|
342
365
|
checkAnyLayerIsPresent(layerName) {
|
|
343
366
|
return Object.values(UI_ITEMS).some((item) => {
|
|
344
367
|
if (item === layerName)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Sound, sound } from "@pixi/sound";
|
|
2
2
|
import { RainMan } from "../../Rainman";
|
|
3
3
|
import { SoundTracks } from "./types";
|
|
4
|
-
const soundsToLoop = [SoundTracks.mysteryFxLoop, SoundTracks.music];
|
|
4
|
+
const soundsToLoop = [SoundTracks.mysteryFxLoop, SoundTracks.music, SoundTracks.freeSpinsMusic];
|
|
5
5
|
export const pixiSoundContext = sound.context;
|
|
6
6
|
/**
|
|
7
7
|
* Class for managing sound in game, uses the pixi sound library
|
|
@@ -86,20 +86,26 @@ export class SoundManagerInstance {
|
|
|
86
86
|
* @param {SoundTrack} soundName - name of the sound
|
|
87
87
|
*/
|
|
88
88
|
play(soundName) {
|
|
89
|
-
if (!RainMan.settingsStore.shouldPlayFxSounds)
|
|
89
|
+
if (!RainMan.settingsStore.shouldPlayFxSounds) {
|
|
90
90
|
return;
|
|
91
|
+
}
|
|
91
92
|
const overrideSoundName = this.overrides[soundName];
|
|
92
93
|
const sound = overrideSoundName
|
|
93
94
|
? this.musicCatalogue.get(overrideSoundName)
|
|
94
95
|
: this.musicCatalogue.get(soundName);
|
|
95
|
-
if (!sound)
|
|
96
|
+
if (!sound) {
|
|
96
97
|
return;
|
|
97
|
-
|
|
98
|
+
}
|
|
99
|
+
if (soundName === "music" &&
|
|
100
|
+
sound.isPlaying &&
|
|
101
|
+
!RainMan.settingsStore.isFreeSpinsPlayEnabled &&
|
|
102
|
+
!RainMan.settingsStore.shouldPlayAmbientMusic) {
|
|
98
103
|
return;
|
|
104
|
+
}
|
|
99
105
|
sound.play({
|
|
100
106
|
loop: soundsToLoop.includes(soundName),
|
|
101
107
|
singleInstance: true,
|
|
102
|
-
volume: soundName ===
|
|
108
|
+
volume: soundName === SoundTracks.music || soundName === SoundTracks.freeSpinsMusic ? 0.5 : 1
|
|
103
109
|
});
|
|
104
110
|
}
|
|
105
111
|
/**
|
|
@@ -108,9 +114,19 @@ export class SoundManagerInstance {
|
|
|
108
114
|
*/
|
|
109
115
|
resumeAll() {
|
|
110
116
|
this.musicCatalogue.forEach((sound, soundName) => {
|
|
111
|
-
if (sound.paused && sound.isPlaying)
|
|
117
|
+
if (sound.paused && sound.isPlaying) {
|
|
112
118
|
sound.resume();
|
|
113
|
-
|
|
119
|
+
}
|
|
120
|
+
if (RainMan.settingsStore.shouldPlayAmbientMusic &&
|
|
121
|
+
!RainMan.settingsStore.isFreeSpinsPlayEnabled &&
|
|
122
|
+
soundName === SoundTracks.music &&
|
|
123
|
+
sound.paused) {
|
|
124
|
+
sound.resume();
|
|
125
|
+
}
|
|
126
|
+
if (RainMan.settingsStore.shouldPlayAmbientMusic &&
|
|
127
|
+
RainMan.settingsStore.isFreeSpinsPlayEnabled &&
|
|
128
|
+
soundName === SoundTracks.freeSpinsMusic &&
|
|
129
|
+
sound.paused) {
|
|
114
130
|
sound.resume();
|
|
115
131
|
}
|
|
116
132
|
});
|
|
@@ -6,6 +6,7 @@ import { Sound } from "@pixi/sound";
|
|
|
6
6
|
* @property {string} deactivationAutostart - click on autostart button
|
|
7
7
|
* @property {string} increaseRate - click on plus button
|
|
8
8
|
* @property {string} music - ambient music in loop
|
|
9
|
+
* @property {string} freeSpinsMusic - ambient music in free spins
|
|
9
10
|
* @property {string} reductionRate - click on neg button
|
|
10
11
|
* @property {string} allRollStops - skipping rolling reels, on end
|
|
11
12
|
* @property {string} bigWin - on show big win popup
|
|
@@ -36,6 +37,7 @@ export interface SoundTracks {
|
|
|
36
37
|
deactivationAutostart: "deactivationAutostart";
|
|
37
38
|
increaseRate: "increaseRate";
|
|
38
39
|
music: "music";
|
|
40
|
+
freeSpinsMusic: "freeSpinsMusic";
|
|
39
41
|
reductionRate: "reductionRate";
|
|
40
42
|
allRollStops: "allRollStops";
|
|
41
43
|
bigWin: "bigWin";
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @property {string} deactivationAutostart - click on autostart button
|
|
6
6
|
* @property {string} increaseRate - click on plus button
|
|
7
7
|
* @property {string} music - ambient music in loop
|
|
8
|
+
* @property {string} freeSpinsMusic - ambient music in free spins
|
|
8
9
|
* @property {string} reductionRate - click on neg button
|
|
9
10
|
* @property {string} allRollStops - skipping rolling reels, on end
|
|
10
11
|
* @property {string} bigWin - on show big win popup
|
|
@@ -34,6 +35,7 @@ export const SoundTracks = {
|
|
|
34
35
|
deactivationAutostart: "deactivationAutostart",
|
|
35
36
|
increaseRate: "increaseRate",
|
|
36
37
|
music: "music",
|
|
38
|
+
freeSpinsMusic: "freeSpinsMusic",
|
|
37
39
|
reductionRate: "reductionRate",
|
|
38
40
|
allRollStops: "allRollStops",
|
|
39
41
|
bigWin: "bigWin",
|
|
@@ -137,7 +137,7 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
137
137
|
* @param {WinTypeId} winType win type of jackpot roulette win
|
|
138
138
|
* @returns {void}
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
protected destroyRouletteWin(winType: WinTypeId): void;
|
|
141
141
|
/**
|
|
142
142
|
* Function for invoking mystery bonus container
|
|
143
143
|
* @param {string} animationName animation name for the mystery bonus container
|
|
@@ -273,7 +273,7 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
273
273
|
* Function for positioning the round win container.
|
|
274
274
|
* @returns {void}
|
|
275
275
|
*/
|
|
276
|
-
|
|
276
|
+
protected positionRoundWinContainer(): void;
|
|
277
277
|
/**
|
|
278
278
|
* Function for invoking the roulette win plate.
|
|
279
279
|
* @param {string} winAnimationName The name of the win animation.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Sprite } from "pixi.js";
|
|
2
2
|
import { SoundManager, SoundTracks } from "../../../application";
|
|
3
3
|
import { TINT_DISABLED, TINT_ENABLED } from "../../../constants";
|
|
4
|
+
import { hidePaytable } from "../../../utils";
|
|
4
5
|
/**
|
|
5
6
|
* Class for basic button with states and textures
|
|
6
7
|
* @class BaseButton
|
|
@@ -23,6 +24,7 @@ export class BaseButton extends Sprite {
|
|
|
23
24
|
}
|
|
24
25
|
this._customClickHandler();
|
|
25
26
|
this._manageStateOver();
|
|
27
|
+
hidePaytable();
|
|
26
28
|
};
|
|
27
29
|
_customClickHandler = () => { };
|
|
28
30
|
constructor(name, textureMap, stateful = false, clickSound = SoundTracks.button) {
|
|
@@ -31,11 +31,38 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
|
|
|
31
31
|
right: number;
|
|
32
32
|
};
|
|
33
33
|
protected constructor();
|
|
34
|
+
/**
|
|
35
|
+
* Function for initializing columns container
|
|
36
|
+
* @protected
|
|
37
|
+
* @returns {void}
|
|
38
|
+
*/
|
|
34
39
|
protected init(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Function for resolving changing symbols in columns
|
|
42
|
+
* This is used in games i.e. BoW and MB
|
|
43
|
+
*/
|
|
35
44
|
resolveMysterySpeedUp(): void;
|
|
45
|
+
/**
|
|
46
|
+
* Method for adapting to speed level
|
|
47
|
+
* @param {SpeedLevel} speedLevel new speed level
|
|
48
|
+
* @public
|
|
49
|
+
*/
|
|
36
50
|
adaptToSpeed(speedLevel: SpeedLevel): void;
|
|
51
|
+
/**
|
|
52
|
+
* Function for enabling quick reels stop
|
|
53
|
+
* @public
|
|
54
|
+
* @returns {void}
|
|
55
|
+
*/
|
|
37
56
|
enableQuickReelsStop(): void;
|
|
57
|
+
/**
|
|
58
|
+
* Function for clearing quick reels stop
|
|
59
|
+
* @public
|
|
60
|
+
*/
|
|
38
61
|
clearQuickReelsStop(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Function for blind spinning all columns
|
|
64
|
+
* @public
|
|
65
|
+
*/
|
|
39
66
|
blindSpin(): void;
|
|
40
67
|
/**
|
|
41
68
|
* This function is responsible for setting symbols in columns
|
|
@@ -46,8 +73,28 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
|
|
|
46
73
|
* @returns {Promise<void>}
|
|
47
74
|
*/
|
|
48
75
|
configBlindSpin(finalSymbolReels: SymbolReels, afterSpinResolver: (value: void | PromiseLike<void>) => void, indexesOfReelsToExtendSpinningTime: number[]): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Function for playing all streaks
|
|
78
|
+
* @param {StreakReelsIndexes[]} streaks - The streaks to play
|
|
79
|
+
* @param {number} amount - The amount to play
|
|
80
|
+
* @param {SymbolId[]} allSymbols - All symbols to consider
|
|
81
|
+
* @returns {Promise<void>} - A promise that resolves when all streaks are played
|
|
82
|
+
* @public
|
|
83
|
+
*/
|
|
49
84
|
playAllStreaks(streaks: StreakReelsIndexes[], amount: number, allSymbols?: SymbolId[]): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Function for resetting played sounds
|
|
87
|
+
* @public
|
|
88
|
+
* @returns {void}
|
|
89
|
+
*/
|
|
50
90
|
resetPlayedSounds(): void;
|
|
91
|
+
/**
|
|
92
|
+
* Function for playing sound depending on the amount
|
|
93
|
+
* @public
|
|
94
|
+
* @param {number} amount - The amount to check
|
|
95
|
+
* @param {SymbolId[]} _allSymbols - All symbols to consider
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
51
98
|
protected playSoundDependingOnAmount(amount: number, _allSymbols?: SymbolId[]): void;
|
|
52
99
|
protected playStreakSound(symbols: SymbolId[]): void;
|
|
53
100
|
/**
|
|
@@ -60,14 +107,71 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
|
|
|
60
107
|
* @returns {Promise<void>}
|
|
61
108
|
*/
|
|
62
109
|
playStreak(streak: StreakReelsIndexes, reelsQuantity: number, multiplier?: number, suffix?: string): Promise<void>;
|
|
110
|
+
/**
|
|
111
|
+
* Method for resizing columns container
|
|
112
|
+
* @public
|
|
113
|
+
* @abstract
|
|
114
|
+
* @returns {void}
|
|
115
|
+
*/
|
|
63
116
|
abstract doResize(): void;
|
|
117
|
+
/**
|
|
118
|
+
* Function for animating columns
|
|
119
|
+
* @public
|
|
120
|
+
* @param {number} delta - delta time for animation
|
|
121
|
+
* @returns {void}
|
|
122
|
+
*/
|
|
64
123
|
animate(delta: number): void;
|
|
124
|
+
/**
|
|
125
|
+
* Function for getting column at specific position
|
|
126
|
+
* @param {number} column index of column
|
|
127
|
+
* @returns {AbstractSymbolsColumn} column at specific position
|
|
128
|
+
* @public
|
|
129
|
+
* @abstract
|
|
130
|
+
*/
|
|
65
131
|
abstract getColumnAtPosition(column: number): AbstractSymbolsColumn;
|
|
132
|
+
/**
|
|
133
|
+
* Function for stopping all playing symbols in columns
|
|
134
|
+
* @public
|
|
135
|
+
* @returns {void}
|
|
136
|
+
*/
|
|
66
137
|
stopPlayingSymbolsInColumns(): void;
|
|
138
|
+
/**
|
|
139
|
+
* Function for stopping all transformations playing symbols in columns
|
|
140
|
+
* @public
|
|
141
|
+
* @returns {void}
|
|
142
|
+
*/
|
|
67
143
|
stopPlayingSymbolsTransformationInColumns(): void;
|
|
144
|
+
/**
|
|
145
|
+
* Function for setting interactivity for all symbols in columns
|
|
146
|
+
* @param {boolean} flag - flag for setting interactivity
|
|
147
|
+
* @public
|
|
148
|
+
* @returns {void}
|
|
149
|
+
*/
|
|
68
150
|
setInteractivityForSymbols(flag: boolean): void;
|
|
151
|
+
/**
|
|
152
|
+
* Function for handling multiple symbol transformations
|
|
153
|
+
* @param {DropTransformationDetails} transformations - array of transformations to apply
|
|
154
|
+
* @param {boolean} skipAnimations - flag for skipping animations
|
|
155
|
+
* @param {boolean} isStandalone - flag for standalone mode
|
|
156
|
+
* @param {boolean} allowSoundInSymbolsColumn - flag for allowing sound in symbols column
|
|
157
|
+
* @returns {Promise<void>}
|
|
158
|
+
*/
|
|
69
159
|
handleDestroyTransformations(transformations: DropTransformationDetails[], skipAnimations?: boolean, isStandalone?: boolean, allowSoundInSymbolsColumn?: boolean): Promise<void>;
|
|
160
|
+
/**
|
|
161
|
+
* Function for creating mask for columns container
|
|
162
|
+
* @protected
|
|
163
|
+
* @returns {Graphics} mask for columns container
|
|
164
|
+
*/
|
|
70
165
|
protected createMask(): Graphics;
|
|
166
|
+
/**
|
|
167
|
+
* Function for fixing symbols columns position
|
|
168
|
+
* @public
|
|
169
|
+
*/
|
|
71
170
|
fixSymbolsColumnsPosition(): void;
|
|
171
|
+
/**
|
|
172
|
+
* Function for preparing configuring reels end
|
|
173
|
+
* @param {SymbolReels} finalSymbolReels - final symbol reels
|
|
174
|
+
* @returns {PlayableAction[]} - array of playable actions
|
|
175
|
+
*/
|
|
72
176
|
protected prepareConfiguringReelsEnd(finalSymbolReels: SymbolReels): PlayableAction[];
|
|
73
177
|
}
|
|
@@ -32,6 +32,11 @@ export class AbstractColumnsContainer extends Container {
|
|
|
32
32
|
this.name = AbstractColumnsContainer.registryName;
|
|
33
33
|
this.parentLayer = FrameLayer;
|
|
34
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Function for initializing columns container
|
|
37
|
+
* @protected
|
|
38
|
+
* @returns {void}
|
|
39
|
+
*/
|
|
35
40
|
init() {
|
|
36
41
|
this.allColumns.forEach((column) => {
|
|
37
42
|
RainMan.componentRegistry.add(column);
|
|
@@ -40,6 +45,10 @@ export class AbstractColumnsContainer extends Container {
|
|
|
40
45
|
Ticker.shared.add((delta) => this.animate(delta));
|
|
41
46
|
this.doResize();
|
|
42
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Function for resolving changing symbols in columns
|
|
50
|
+
* This is used in games i.e. BoW and MB
|
|
51
|
+
*/
|
|
43
52
|
resolveMysterySpeedUp() {
|
|
44
53
|
this.allColumns.forEach((column) => {
|
|
45
54
|
if (column.resolveMysterySpeedUp === null)
|
|
@@ -47,22 +56,41 @@ export class AbstractColumnsContainer extends Container {
|
|
|
47
56
|
column.resolveMysterySpeedUp();
|
|
48
57
|
});
|
|
49
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Method for adapting to speed level
|
|
61
|
+
* @param {SpeedLevel} speedLevel new speed level
|
|
62
|
+
* @public
|
|
63
|
+
*/
|
|
50
64
|
adaptToSpeed(speedLevel) {
|
|
51
65
|
this.velocityMultiplier = this.speedLevelMapper[speedLevel];
|
|
52
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Function for enabling quick reels stop
|
|
69
|
+
* @public
|
|
70
|
+
* @returns {void}
|
|
71
|
+
*/
|
|
53
72
|
enableQuickReelsStop() {
|
|
54
|
-
RainMan.componentRegistry.setTemporarySpeedLevel(SPEED_LEVELS.fast);
|
|
55
73
|
this.quickReelsStop = true;
|
|
74
|
+
RainMan.componentRegistry.setTemporarySpeedLevel(SPEED_LEVELS.fast);
|
|
56
75
|
this.skipScatterDelay?.();
|
|
57
76
|
this.resolveMysterySpeedUp();
|
|
58
77
|
this.skipScatterDelay = null;
|
|
59
|
-
if (this.currentColumn)
|
|
78
|
+
if (this.currentColumn) {
|
|
60
79
|
this.currentColumn.skipHidingMysteryFx = true;
|
|
80
|
+
}
|
|
61
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Function for clearing quick reels stop
|
|
84
|
+
* @public
|
|
85
|
+
*/
|
|
62
86
|
clearQuickReelsStop() {
|
|
63
87
|
this.quickReelsStop = false;
|
|
64
88
|
RainMan.componentRegistry.revertTemporarySpeedLevel();
|
|
65
89
|
}
|
|
90
|
+
/**
|
|
91
|
+
* Function for blind spinning all columns
|
|
92
|
+
* @public
|
|
93
|
+
*/
|
|
66
94
|
blindSpin() {
|
|
67
95
|
this.allColumns.forEach((column) => column.blindSpin());
|
|
68
96
|
}
|
|
@@ -77,14 +105,15 @@ export class AbstractColumnsContainer extends Container {
|
|
|
77
105
|
async configBlindSpin(finalSymbolReels, afterSpinResolver, indexesOfReelsToExtendSpinningTime) {
|
|
78
106
|
// spin
|
|
79
107
|
return new Promise(async (resolve) => {
|
|
80
|
-
const configuredBlindSpinsActions = this.prepareConfiguringReelsEnd(finalSymbolReels);
|
|
81
108
|
let index = 0;
|
|
109
|
+
const configuredBlindSpinsActions = this.prepareConfiguringReelsEnd(finalSymbolReels);
|
|
82
110
|
const frame = RainMan.componentRegistry.get(AbstractFrame.registryName);
|
|
83
111
|
while (configuredBlindSpinsActions.length !== 0) {
|
|
84
112
|
if (this.quickReelsStop || RainMan.settingsStore.currentSpeed === SPEED_LEVELS.fast) {
|
|
85
113
|
await Promise.all(configuredBlindSpinsActions.map(async (action) => await action()));
|
|
86
114
|
configuredBlindSpinsActions.length = 0;
|
|
87
115
|
SoundManager.play(SoundTracks.allRollStops);
|
|
116
|
+
this.clearQuickReelsStop();
|
|
88
117
|
break;
|
|
89
118
|
}
|
|
90
119
|
const configureSpinAction = configuredBlindSpinsActions.shift();
|
|
@@ -101,8 +130,9 @@ export class AbstractColumnsContainer extends Container {
|
|
|
101
130
|
}, RainMan.config.durationOfActions.scatterDelayerTime);
|
|
102
131
|
await this.currentColumn.changeVelocity(Speed.STOP, RainMan.config.durationOfActions.scatterSpinningTime, frame);
|
|
103
132
|
}
|
|
104
|
-
if (!indexesOfReelsToExtendSpinningTime.includes(index))
|
|
133
|
+
if (!indexesOfReelsToExtendSpinningTime.includes(index)) {
|
|
105
134
|
await configureSpinAction();
|
|
135
|
+
}
|
|
106
136
|
}
|
|
107
137
|
index++;
|
|
108
138
|
this.currentColumn = null;
|
|
@@ -112,6 +142,14 @@ export class AbstractColumnsContainer extends Container {
|
|
|
112
142
|
resolve();
|
|
113
143
|
});
|
|
114
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Function for playing all streaks
|
|
147
|
+
* @param {StreakReelsIndexes[]} streaks - The streaks to play
|
|
148
|
+
* @param {number} amount - The amount to play
|
|
149
|
+
* @param {SymbolId[]} allSymbols - All symbols to consider
|
|
150
|
+
* @returns {Promise<void>} - A promise that resolves when all streaks are played
|
|
151
|
+
* @public
|
|
152
|
+
*/
|
|
115
153
|
async playAllStreaks(streaks, amount, allSymbols = []) {
|
|
116
154
|
const columnsToPlay = [];
|
|
117
155
|
streaks.forEach((streak) => {
|
|
@@ -131,9 +169,21 @@ export class AbstractColumnsContainer extends Container {
|
|
|
131
169
|
this.playSoundDependingOnAmount(amount, allSymbols);
|
|
132
170
|
await Promise.allSettled(promises);
|
|
133
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Function for resetting played sounds
|
|
174
|
+
* @public
|
|
175
|
+
* @returns {void}
|
|
176
|
+
*/
|
|
134
177
|
resetPlayedSounds() {
|
|
135
178
|
this.playedSounds = [];
|
|
136
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* Function for playing sound depending on the amount
|
|
182
|
+
* @public
|
|
183
|
+
* @param {number} amount - The amount to check
|
|
184
|
+
* @param {SymbolId[]} _allSymbols - All symbols to consider
|
|
185
|
+
* @returns {void}
|
|
186
|
+
*/
|
|
137
187
|
playSoundDependingOnAmount(amount, _allSymbols = []) {
|
|
138
188
|
const bet = RainMan.settingsStore.bet;
|
|
139
189
|
if (amount < WIN_MULTIPLIER_VALUES.LOW_WIN * bet) {
|
|
@@ -198,12 +248,23 @@ export class AbstractColumnsContainer extends Container {
|
|
|
198
248
|
this.playStreakSound(streakSymbols);
|
|
199
249
|
await Promise.allSettled(promises);
|
|
200
250
|
}
|
|
251
|
+
/**
|
|
252
|
+
* Function for animating columns
|
|
253
|
+
* @public
|
|
254
|
+
* @param {number} delta - delta time for animation
|
|
255
|
+
* @returns {void}
|
|
256
|
+
*/
|
|
201
257
|
animate(delta) {
|
|
202
258
|
const { lastTime } = Ticker.shared;
|
|
203
259
|
for (const column of this.allColumns) {
|
|
204
260
|
column.animate(delta, lastTime);
|
|
205
261
|
}
|
|
206
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Function for stopping all playing symbols in columns
|
|
265
|
+
* @public
|
|
266
|
+
* @returns {void}
|
|
267
|
+
*/
|
|
207
268
|
stopPlayingSymbolsInColumns() {
|
|
208
269
|
this.allColumns.forEach((column) => column.stopAllPlayingSymbols());
|
|
209
270
|
if (this.currentPlayingSoundName) {
|
|
@@ -211,12 +272,31 @@ export class AbstractColumnsContainer extends Container {
|
|
|
211
272
|
this.currentPlayingSoundName = null;
|
|
212
273
|
}
|
|
213
274
|
}
|
|
275
|
+
/**
|
|
276
|
+
* Function for stopping all transformations playing symbols in columns
|
|
277
|
+
* @public
|
|
278
|
+
* @returns {void}
|
|
279
|
+
*/
|
|
214
280
|
stopPlayingSymbolsTransformationInColumns() {
|
|
215
281
|
this.allColumns.forEach((column) => column.stopTransformationPlayingSymbols());
|
|
216
282
|
}
|
|
283
|
+
/**
|
|
284
|
+
* Function for setting interactivity for all symbols in columns
|
|
285
|
+
* @param {boolean} flag - flag for setting interactivity
|
|
286
|
+
* @public
|
|
287
|
+
* @returns {void}
|
|
288
|
+
*/
|
|
217
289
|
setInteractivityForSymbols(flag) {
|
|
218
290
|
this.allColumns.forEach((column) => column.setAllSymbolsInteractiveFlag(flag));
|
|
219
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Function for handling multiple symbol transformations
|
|
294
|
+
* @param {DropTransformationDetails} transformations - array of transformations to apply
|
|
295
|
+
* @param {boolean} skipAnimations - flag for skipping animations
|
|
296
|
+
* @param {boolean} isStandalone - flag for standalone mode
|
|
297
|
+
* @param {boolean} allowSoundInSymbolsColumn - flag for allowing sound in symbols column
|
|
298
|
+
* @returns {Promise<void>}
|
|
299
|
+
*/
|
|
220
300
|
async handleDestroyTransformations(transformations, skipAnimations = false, isStandalone = false, allowSoundInSymbolsColumn = true) {
|
|
221
301
|
if (transformations.length === 0) {
|
|
222
302
|
return Promise.resolve();
|
|
@@ -224,6 +304,11 @@ export class AbstractColumnsContainer extends Container {
|
|
|
224
304
|
const column = this.getColumnAtPosition(transformations[0].coordinates.x);
|
|
225
305
|
await column.handleMultipleSymbolDropping(transformations, skipAnimations, isStandalone, allowSoundInSymbolsColumn);
|
|
226
306
|
}
|
|
307
|
+
/**
|
|
308
|
+
* Function for creating mask for columns container
|
|
309
|
+
* @protected
|
|
310
|
+
* @returns {Graphics} mask for columns container
|
|
311
|
+
*/
|
|
227
312
|
createMask() {
|
|
228
313
|
const mask = new Graphics();
|
|
229
314
|
mask.beginFill(0xaaaaaa, 1);
|
|
@@ -233,9 +318,18 @@ export class AbstractColumnsContainer extends Container {
|
|
|
233
318
|
mask.endFill();
|
|
234
319
|
return mask;
|
|
235
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Function for fixing symbols columns position
|
|
323
|
+
* @public
|
|
324
|
+
*/
|
|
236
325
|
fixSymbolsColumnsPosition() {
|
|
237
326
|
this.allColumns.forEach((column) => column.fixStationaryPositions());
|
|
238
327
|
}
|
|
328
|
+
/**
|
|
329
|
+
* Function for preparing configuring reels end
|
|
330
|
+
* @param {SymbolReels} finalSymbolReels - final symbol reels
|
|
331
|
+
* @returns {PlayableAction[]} - array of playable actions
|
|
332
|
+
*/
|
|
239
333
|
prepareConfiguringReelsEnd(finalSymbolReels) {
|
|
240
334
|
return this.allColumns.map((column, index) => async () => {
|
|
241
335
|
column.configBlindSpin(finalSymbolReels[index]);
|
|
@@ -32,19 +32,81 @@ export declare class MessageBox extends Container {
|
|
|
32
32
|
private incentiveMessageShown;
|
|
33
33
|
private winLineIndicatorShown;
|
|
34
34
|
constructor();
|
|
35
|
+
/**
|
|
36
|
+
* Updates the incentive text displayed in the message box.
|
|
37
|
+
* @param {string} newText - The new text to display.
|
|
38
|
+
*/
|
|
35
39
|
updateIncentiveText(newText: string): void;
|
|
40
|
+
/**
|
|
41
|
+
* Function for hiding current win text
|
|
42
|
+
*/
|
|
36
43
|
hideCurrentWinText(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Function fro hiding possible win text
|
|
46
|
+
*/
|
|
37
47
|
hidePossibleWinText(): void;
|
|
48
|
+
/**
|
|
49
|
+
* Function for hiding free spin text
|
|
50
|
+
*/
|
|
38
51
|
hideFreeSpinText(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Function for hiding auto spin text
|
|
54
|
+
*/
|
|
39
55
|
hideAutoSpinText(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Function for hiding incentive text
|
|
58
|
+
*/
|
|
40
59
|
hideIncentiveText(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Function for hiding win line indicator
|
|
62
|
+
*/
|
|
41
63
|
hideWinLineIndicator(): void;
|
|
64
|
+
/**
|
|
65
|
+
* Function for resizing message box
|
|
66
|
+
* It sets the scale of the message box to the global minimum ratio.
|
|
67
|
+
* If the device orientation is mobile and the win line indicator is shown, it repositions
|
|
68
|
+
* the win line indicator to ensure it is displayed correctly.
|
|
69
|
+
* @memberof MessageBox
|
|
70
|
+
*/
|
|
42
71
|
resize(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Getter for the height of the win line animation.
|
|
74
|
+
* If the win line indicator is not defined, it returns 0.
|
|
75
|
+
* @returns {number} The height of the win line animation.
|
|
76
|
+
*/
|
|
77
|
+
get winLineAnimationHeight(): number;
|
|
78
|
+
/**
|
|
79
|
+
* Displays the current win text in the message box.
|
|
80
|
+
* @returns {void}
|
|
81
|
+
*/
|
|
43
82
|
showCurrentWinText(): void;
|
|
44
83
|
showPossibleWinText(): void;
|
|
84
|
+
/**
|
|
85
|
+
* Displays the auto spin text in the message box.
|
|
86
|
+
* It checks if auto spins are enabled and if the text is already shown.
|
|
87
|
+
* @returns {void}
|
|
88
|
+
*/
|
|
45
89
|
showAutoSpinText(): void;
|
|
90
|
+
/**
|
|
91
|
+
* Displays the free spin text in the message box.
|
|
92
|
+
* It checks if free spins are enabled and if the text is already shown.
|
|
93
|
+
* If free spin text is disabled in the configuration, it does nothing.
|
|
94
|
+
* @returns {void}
|
|
95
|
+
*/
|
|
46
96
|
showFreeSpinText(): void;
|
|
47
97
|
showIncentiveText(): void;
|
|
98
|
+
/**
|
|
99
|
+
* Function to center a text component on the X-axis of the message box.
|
|
100
|
+
* @param {Container | undefined} component container component to center
|
|
101
|
+
* @returns {void}
|
|
102
|
+
*/
|
|
48
103
|
private centerTextOnX;
|
|
104
|
+
/**
|
|
105
|
+
* Displays the win line indicator in the message box.
|
|
106
|
+
* @param {string} message The message to display.
|
|
107
|
+
* @param {(symbolId: SymbolId, suffix?: string) => string} getImageForSymbolId Function to get the image for a symbol ID.
|
|
108
|
+
* @param {SymbolId[]} symbolIds The symbol IDs to display.
|
|
109
|
+
* @param {Partial<ITextStyle>} winLineTextStyleOverrides Overrides for the text style.
|
|
110
|
+
*/
|
|
49
111
|
showWinLineIndicator(message: string, getImageForSymbolId: (symbolId: SymbolId, suffix?: string) => string, symbolIds?: SymbolId[], winLineTextStyleOverrides?: Partial<ITextStyle>): void;
|
|
50
112
|
}
|