pixi-rainman-game-engine 0.2.24 → 0.2.26
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 +1 -2
- package/dist/ComponentRegistry/types.js +1 -1
- package/dist/Rainman/Rainman.js +2 -2
- package/dist/Rainman/appConfig.js +3 -3
- package/dist/Rainman/types.d.ts +2 -0
- package/dist/SettingsUI/components/AutoplaySettings/index.jsx +2 -2
- package/dist/SettingsUI/components/BuyFreeSpins/index.jsx +2 -1
- package/dist/SettingsUI/components/OptionButton/index.jsx +3 -2
- package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.js +14 -10
- package/dist/application/ApiConfig/WinTypeId.d.ts +1 -1
- package/dist/application/SoundManager/types.d.ts +11 -0
- package/dist/application/SoundManager/types.js +4 -0
- package/dist/application/SpinLogic/util.js +5 -5
- package/dist/application/setup.js +1 -1
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +206 -6
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +284 -7
- package/dist/components/buttons/BaseButton/ButtonState.js +1 -1
- package/dist/components/buttons/registrynames.d.ts +1 -0
- package/dist/components/buttons/registrynames.js +3 -2
- package/dist/components/frame/AbstractFrame.d.ts +4 -1
- package/dist/components/frame/AbstractFrame.js +2 -0
- package/dist/components/frame/constants.d.ts +8 -0
- package/dist/components/frame/constants.js +8 -1
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +2 -2
- package/dist/connectivity/ConnectionWrapper.d.ts +56 -3
- package/dist/connectivity/ConnectionWrapper.js +83 -18
- package/dist/connectivity/LocalConnectionWrapper.d.ts +1 -0
- package/dist/connectivity/LocalConnectionWrapper.js +10 -0
- package/dist/connectivity/serverConnection.d.ts +14 -6
- package/dist/connectivity/serverData.d.ts +15 -2
- package/dist/connectivity/spinData.js +2 -2
- package/dist/constants/gamePhase.js +1 -1
- package/dist/constants/transformation.js +1 -1
- package/dist/constants/wins.js +1 -1
- package/dist/controllers/AbstractController.d.ts +127 -6
- package/dist/controllers/AbstractController.js +164 -16
- package/dist/controllers/UiController.d.ts +2 -1
- package/dist/controllers/UiController.js +4 -2
- package/dist/loading/AbstractLoadingContainer.js +1 -1
- package/dist/stores/SettingsStore.d.ts +6 -2
- package/dist/stores/SettingsStore.js +10 -0
- package/dist/utils/common/functions.js +1 -1
- package/dist/utils/common/placementHelpers.js +1 -1
- package/dist/utils/common/types.d.ts +2 -1
- package/dist/winComponents/BaseWinContainer.d.ts +5 -1
- package/dist/winComponents/BaseWinContainer.js +18 -2
- package/dist/winComponents/BigWinContainer.js +1 -0
- package/dist/winComponents/TexturedText.d.ts +1 -0
- package/dist/winComponents/TexturedText.js +13 -2
- package/package.json +2 -2
|
@@ -22,7 +22,6 @@ import { MessageBox } from "../messageBox";
|
|
|
22
22
|
* - {@link overlay} - overlay, used when modal is shown
|
|
23
23
|
* - {@link gambleGame} - gamble game
|
|
24
24
|
* @abstract
|
|
25
|
-
* @class AbstractMainContainer
|
|
26
25
|
* @augments {Container}
|
|
27
26
|
*/
|
|
28
27
|
export class AbstractMainContainer extends Container {
|
|
@@ -41,8 +40,11 @@ export class AbstractMainContainer extends Container {
|
|
|
41
40
|
portraitPlayButtons = null;
|
|
42
41
|
landscapePlayButtons = null;
|
|
43
42
|
bottomPanel = null;
|
|
44
|
-
gambleGame = null;
|
|
45
43
|
gambleGameSpineName = null;
|
|
44
|
+
gambleGame = null;
|
|
45
|
+
rouletteWinContainer = null;
|
|
46
|
+
mysteryBonusContainer = null;
|
|
47
|
+
resolveMysteryBonusContainer = undefined;
|
|
46
48
|
_freeSpinPlate = null;
|
|
47
49
|
_freeSpinSummary = null;
|
|
48
50
|
_bigWinInvokedAt = null;
|
|
@@ -61,8 +63,19 @@ export class AbstractMainContainer extends Container {
|
|
|
61
63
|
SoundManager.setPlayStatus(SoundTracks.music, RainMan.settingsStore.shouldPlayAmbientMusic);
|
|
62
64
|
}
|
|
63
65
|
}
|
|
66
|
+
RainMan.settingsStore.setHandleInvokeFreeSpinPlate(this.invokeFreeSpinPlate.bind(this));
|
|
64
67
|
RainMan.app.renderer.on("resize", () => this.resize());
|
|
65
68
|
}
|
|
69
|
+
/**
|
|
70
|
+
* Function for invoking mystery win plate
|
|
71
|
+
* @param {string} _animationName - The name of the animation to play.
|
|
72
|
+
* @param {string} _popupAnimation - The name of the popup animation to play.
|
|
73
|
+
* @param {WinTypeId} _winType - The type of win to display.
|
|
74
|
+
* @param {number} _amount - The amount of the win.
|
|
75
|
+
* @param {boolean} _isAdditionalFreeSpins - Flag indicating if this is for additional free spins.
|
|
76
|
+
* @returns {Promise<void>} - A promise that resolves when the animation is complete.
|
|
77
|
+
*/
|
|
78
|
+
async invokeMysteryWinPlate(_animationName, _popupAnimation, _winType, _amount, _isAdditionalFreeSpins) { }
|
|
66
79
|
/**
|
|
67
80
|
* This function initializes the spines that should be paused when the battery saver is on
|
|
68
81
|
* @param {typeof RainMan.settingsStore.containersWithSpines} containersWithSpines - array of containers with spines
|
|
@@ -71,9 +84,17 @@ export class AbstractMainContainer extends Container {
|
|
|
71
84
|
RainMan.settingsStore.containersWithSpines.push(...containersWithSpines);
|
|
72
85
|
RainMan.settingsStore.refreshBatterySaver();
|
|
73
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Function for getting free spin plate
|
|
89
|
+
* @returns {Nullable<AbstractFreeSpinContainer>} The container for the free spin plate, or null if not set.
|
|
90
|
+
*/
|
|
74
91
|
get freeSpinPlate() {
|
|
75
92
|
return this._freeSpinPlate;
|
|
76
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Function for getting free spin summary
|
|
96
|
+
* @returns {Nullable<AbstractFreeSpinContainer>} The container for the free spin summary, or null if not set.
|
|
97
|
+
*/
|
|
77
98
|
get freeSpinSummary() {
|
|
78
99
|
return this._freeSpinSummary;
|
|
79
100
|
}
|
|
@@ -108,6 +129,14 @@ export class AbstractMainContainer extends Container {
|
|
|
108
129
|
createMysteryWinContainer() {
|
|
109
130
|
return null;
|
|
110
131
|
}
|
|
132
|
+
/**
|
|
133
|
+
* Function for creating mystery bonus container
|
|
134
|
+
* @param {string} _animationName - animation name for the mystery bonus container
|
|
135
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the mystery bonus animation, or null.
|
|
136
|
+
*/
|
|
137
|
+
createMysteryBonusContainer(_animationName) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
111
140
|
/**
|
|
112
141
|
* Function for specifying the container for the free spin summary
|
|
113
142
|
* This needs to be implemented in each game
|
|
@@ -119,6 +148,50 @@ export class AbstractMainContainer extends Container {
|
|
|
119
148
|
* This needs to be implemented in each game
|
|
120
149
|
*/
|
|
121
150
|
changeContainerForBaseGame() { }
|
|
151
|
+
/**
|
|
152
|
+
* Function for creating roulette win container
|
|
153
|
+
* @param {string} _animationName animation name for the roulette container
|
|
154
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the roulette win animation, or null.
|
|
155
|
+
*/
|
|
156
|
+
createRouletteContainer(_animationName) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Function for destroying the roulette win container
|
|
161
|
+
* @param {WinTypeId} winType win type of jackpot roulette win
|
|
162
|
+
* @returns {void}
|
|
163
|
+
*/
|
|
164
|
+
destroyRouletteWin(winType) {
|
|
165
|
+
if (!this.rouletteWinContainer)
|
|
166
|
+
return;
|
|
167
|
+
this.removeChild(this.rouletteWinContainer);
|
|
168
|
+
this.rouletteWinContainer.destroyAnimations();
|
|
169
|
+
this.rouletteWinContainer.destroy({ children: true });
|
|
170
|
+
this.rouletteWinContainer = null;
|
|
171
|
+
this._frame.playJackpotAnimation(winType);
|
|
172
|
+
this.hideOverlay();
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Function for invoking mystery bonus container
|
|
176
|
+
* @param {string} animationName animation name for the mystery bonus container
|
|
177
|
+
* @returns {Promise<void>}
|
|
178
|
+
*/
|
|
179
|
+
async invokeMysteryBonusContainer(animationName) {
|
|
180
|
+
return new Promise((resolve) => {
|
|
181
|
+
this.resolveMysteryBonusContainer = resolve;
|
|
182
|
+
this.mysteryBonusContainer = this.createMysteryBonusContainer(animationName);
|
|
183
|
+
if (!this.mysteryBonusContainer)
|
|
184
|
+
return;
|
|
185
|
+
this.mysteryBonusContainer.text.visible = false;
|
|
186
|
+
this.mysteryBonusContainer.x = RainMan.app.screen.width / 2;
|
|
187
|
+
this.mysteryBonusContainer.y = RainMan.app.screen.height / 2;
|
|
188
|
+
this.mysteryBonusContainer.resize();
|
|
189
|
+
this.addChild(this.mysteryBonusContainer);
|
|
190
|
+
this.mysteryBonusContainer.spine.state.addListener({
|
|
191
|
+
complete: () => resolve()
|
|
192
|
+
});
|
|
193
|
+
});
|
|
194
|
+
}
|
|
122
195
|
/**
|
|
123
196
|
* Function for invoking free spin plate
|
|
124
197
|
* If game draw an additional free spin, you can set isAdditionalFreeSpin to true
|
|
@@ -178,6 +251,10 @@ export class AbstractMainContainer extends Container {
|
|
|
178
251
|
this.hideOverlay();
|
|
179
252
|
refreshButton.flipDisabledFlag(false);
|
|
180
253
|
}
|
|
254
|
+
/**
|
|
255
|
+
* Function for hiding free spin summary
|
|
256
|
+
* @returns {void}
|
|
257
|
+
*/
|
|
181
258
|
hideFreeSpinSummary() {
|
|
182
259
|
if (!this.freeSpinSummary)
|
|
183
260
|
return;
|
|
@@ -186,6 +263,11 @@ export class AbstractMainContainer extends Container {
|
|
|
186
263
|
this._freeSpinSummary = null;
|
|
187
264
|
this.hideOverlay();
|
|
188
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* Function for showing the overlay
|
|
268
|
+
* This function creates a semi-transparent overlay that covers the entire screen.
|
|
269
|
+
* It is used to block interactions with the game while a modal is displayed.
|
|
270
|
+
*/
|
|
189
271
|
showOverlay() {
|
|
190
272
|
const { width, height } = RainMan.app.screen;
|
|
191
273
|
this.overlay = new Graphics();
|
|
@@ -197,29 +279,53 @@ export class AbstractMainContainer extends Container {
|
|
|
197
279
|
this.overlay.interactive = true;
|
|
198
280
|
this.addChild(this.overlay);
|
|
199
281
|
}
|
|
282
|
+
/**
|
|
283
|
+
* Function for hiding the overlay
|
|
284
|
+
* This function removes the overlay from the main container and sets it to null.
|
|
285
|
+
*/
|
|
200
286
|
hideOverlay() {
|
|
201
|
-
if (this.overlay)
|
|
287
|
+
if (this.overlay) {
|
|
202
288
|
this.removeChild(this.overlay);
|
|
289
|
+
}
|
|
203
290
|
this.overlay = null;
|
|
204
291
|
}
|
|
292
|
+
/**
|
|
293
|
+
* Function for getting the time since the big win was invoked.
|
|
294
|
+
* @returns {number} The time in milliseconds since the big win was invoked, or 0 if it has not been invoked.
|
|
295
|
+
*/
|
|
205
296
|
get bigWinVisibleFor() {
|
|
206
297
|
return this._bigWinInvokedAt == null ? 0 : performance.now() - this._bigWinInvokedAt;
|
|
207
298
|
}
|
|
299
|
+
/**
|
|
300
|
+
* Function for getting the free spin button.
|
|
301
|
+
* @returns {typeof this.freeSpinButton} The free spin button instance.
|
|
302
|
+
*/
|
|
208
303
|
getFreeSpinButton() {
|
|
209
304
|
return this.freeSpinButton;
|
|
210
305
|
}
|
|
306
|
+
/**
|
|
307
|
+
* Function for getting the time since the mystery win was invoked.
|
|
308
|
+
* @returns {number} The time in milliseconds since the mystery win was invoked, or 0 if it has not been invoked.
|
|
309
|
+
*/
|
|
211
310
|
get mysteryWinVisibleFor() {
|
|
212
311
|
return this._mysteryWinInvokedAt == null ? 0 : performance.now() - this._mysteryWinInvokedAt;
|
|
213
312
|
}
|
|
313
|
+
/**
|
|
314
|
+
* Function for getting the time since the bonus win was invoked.
|
|
315
|
+
* @returns {number} The time in milliseconds since the bonus win was invoked, or 0 if it has not been invoked.
|
|
316
|
+
*/
|
|
214
317
|
get bonusWinVisibleFor() {
|
|
215
318
|
return this._bonusWinInvokedAt == null ? 0 : performance.now() - this._bonusWinInvokedAt;
|
|
216
319
|
}
|
|
320
|
+
/**
|
|
321
|
+
* Function for getting the time since the super bonus win was invoked.
|
|
322
|
+
* @returns {number} The time in milliseconds since the super bonus win was invoked, or 0 if it has not been invoked.
|
|
323
|
+
*/
|
|
217
324
|
get superBonusWinVisibleFor() {
|
|
218
325
|
return this._superBonusWinInvokedAt == null ? 0 : performance.now() - this._superBonusWinInvokedAt;
|
|
219
326
|
}
|
|
220
327
|
/**
|
|
221
328
|
* Function for invoking big win animation, using `this.createBigWinContainer()` abstract function.
|
|
222
|
-
*
|
|
223
329
|
*/
|
|
224
330
|
invokeBigWin() {
|
|
225
331
|
if (this.bigWinContainer !== null) {
|
|
@@ -237,7 +343,6 @@ export class AbstractMainContainer extends Container {
|
|
|
237
343
|
}
|
|
238
344
|
/**
|
|
239
345
|
* Function for invoking big win animation, using `this.createSuperBonusWinContainer()` abstract function.
|
|
240
|
-
*
|
|
241
346
|
*/
|
|
242
347
|
invokeSuperBonusWin() {
|
|
243
348
|
if (this.superBonusWinContainer !== null) {
|
|
@@ -269,6 +374,9 @@ export class AbstractMainContainer extends Container {
|
|
|
269
374
|
this.addChild(this.bonusWinContainer);
|
|
270
375
|
this._bonusWinInvokedAt = performance.now();
|
|
271
376
|
}
|
|
377
|
+
/**
|
|
378
|
+
* Function for invoking mystery win animation, using `this.createMysteryWinContainer()` abstract function.
|
|
379
|
+
*/
|
|
272
380
|
invokeMysteryWin() {
|
|
273
381
|
if (this.mysteryWinContainer !== null) {
|
|
274
382
|
throw new Error("😡 Mystery Win is already declared");
|
|
@@ -284,6 +392,11 @@ export class AbstractMainContainer extends Container {
|
|
|
284
392
|
this.addChild(this.mysteryWinContainer);
|
|
285
393
|
this._mysteryWinInvokedAt = performance.now();
|
|
286
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* Function for destroying the big win container
|
|
397
|
+
* This function removes the big win container from the main container,
|
|
398
|
+
* destroys its animations, and sets it to null.
|
|
399
|
+
*/
|
|
287
400
|
destroyBigWin() {
|
|
288
401
|
if (this.bigWinContainer === null)
|
|
289
402
|
return;
|
|
@@ -293,6 +406,9 @@ export class AbstractMainContainer extends Container {
|
|
|
293
406
|
this.bigWinContainer = null;
|
|
294
407
|
this._bigWinInvokedAt = null;
|
|
295
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* Function for destroying the mystery win container
|
|
411
|
+
*/
|
|
296
412
|
destroyMysteryWin() {
|
|
297
413
|
if (this.mysteryWinContainer === null)
|
|
298
414
|
return;
|
|
@@ -302,6 +418,9 @@ export class AbstractMainContainer extends Container {
|
|
|
302
418
|
this.mysteryWinContainer = null;
|
|
303
419
|
this._mysteryWinInvokedAt = null;
|
|
304
420
|
}
|
|
421
|
+
/**
|
|
422
|
+
* Function for destroying the bonus win container
|
|
423
|
+
*/
|
|
305
424
|
destroyBonusWin() {
|
|
306
425
|
if (this.bonusWinContainer === null)
|
|
307
426
|
return;
|
|
@@ -311,6 +430,9 @@ export class AbstractMainContainer extends Container {
|
|
|
311
430
|
this.bonusWinContainer = null;
|
|
312
431
|
this._bonusWinInvokedAt = null;
|
|
313
432
|
}
|
|
433
|
+
/**
|
|
434
|
+
* Function for destroying the super bonus win container
|
|
435
|
+
*/
|
|
314
436
|
destroySuperBonusWin() {
|
|
315
437
|
if (this.superBonusWinContainer === null)
|
|
316
438
|
return;
|
|
@@ -320,6 +442,18 @@ export class AbstractMainContainer extends Container {
|
|
|
320
442
|
this.superBonusWinContainer = null;
|
|
321
443
|
this._superBonusWinInvokedAt = null;
|
|
322
444
|
}
|
|
445
|
+
destroyMysteryBonus() {
|
|
446
|
+
if (!this.mysteryBonusContainer)
|
|
447
|
+
return;
|
|
448
|
+
this.removeChild(this.mysteryBonusContainer);
|
|
449
|
+
this.mysteryBonusContainer.destroyAnimations();
|
|
450
|
+
this.mysteryBonusContainer.destroy({ children: true });
|
|
451
|
+
this.mysteryBonusContainer = null;
|
|
452
|
+
}
|
|
453
|
+
/**
|
|
454
|
+
* Function for invoking gamble game
|
|
455
|
+
* @returns {Promise<void>} - A promise that resolves when the gamble game is finished.
|
|
456
|
+
*/
|
|
323
457
|
async invokeGambleGame() {
|
|
324
458
|
if (!this.gambleGameSpineName)
|
|
325
459
|
return;
|
|
@@ -338,12 +472,22 @@ export class AbstractMainContainer extends Container {
|
|
|
338
472
|
this._controller.balance = newBalance;
|
|
339
473
|
this.hideOverlay();
|
|
340
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
* Function for creating the under frame panel.
|
|
477
|
+
* This panel is used in mobile portrait mode to display additional information.
|
|
478
|
+
* @returns {Graphics | Sprite} The under frame panel as a Graphics or Sprite object.
|
|
479
|
+
*/
|
|
341
480
|
createUnderFramePanel() {
|
|
342
481
|
const underFramePanel = new Graphics();
|
|
343
482
|
underFramePanel.beginFill(0x0, 0.75);
|
|
344
483
|
underFramePanel.drawRect(0, 0, 800, 100);
|
|
345
484
|
return underFramePanel;
|
|
346
485
|
}
|
|
486
|
+
/**
|
|
487
|
+
* Function for enabling mobile portrait mode.
|
|
488
|
+
* It creates the under frame panel, portrait play buttons, and adds them to the container.
|
|
489
|
+
* @returns {void}
|
|
490
|
+
*/
|
|
347
491
|
enableForMobile() {
|
|
348
492
|
if (this.logo)
|
|
349
493
|
this.logo.renderable = true;
|
|
@@ -356,14 +500,74 @@ export class AbstractMainContainer extends Container {
|
|
|
356
500
|
this.portraitPlayButtons.parentLayer = UXLayer;
|
|
357
501
|
this.addChild(this.portraitPlayButtons);
|
|
358
502
|
}
|
|
503
|
+
/**
|
|
504
|
+
* Function for enabling landscape mode.
|
|
505
|
+
* @returns {void}
|
|
506
|
+
*/
|
|
359
507
|
enableForLandscape() {
|
|
360
508
|
this.landscapePlayButtons = this.createLandscapePlayButtons();
|
|
361
509
|
this.landscapePlayButtons.parentLayer = UXLayer;
|
|
362
510
|
this.addChild(this.landscapePlayButtons);
|
|
363
511
|
}
|
|
512
|
+
/**
|
|
513
|
+
* Function for positioning the round win container.
|
|
514
|
+
* @returns {void}
|
|
515
|
+
*/
|
|
516
|
+
positionRoundWinContainer() {
|
|
517
|
+
if (!this.rouletteWinContainer)
|
|
518
|
+
return;
|
|
519
|
+
const { width, height } = RainMan.app.screen;
|
|
520
|
+
this.rouletteWinContainer.text.visible = false;
|
|
521
|
+
this.rouletteWinContainer.x = width / 2;
|
|
522
|
+
this.rouletteWinContainer.y = height / 2;
|
|
523
|
+
this.rouletteWinContainer.resize();
|
|
524
|
+
this.addChild(this.rouletteWinContainer);
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Function for invoking the roulette win plate.
|
|
528
|
+
* @param {string} winAnimationName The name of the win animation.
|
|
529
|
+
* @param {WinTypeId} winType The type of win.
|
|
530
|
+
* @param {string} startAnimationName The name of the start animation defaulting to "start".
|
|
531
|
+
*/
|
|
532
|
+
async invokeRouletteWinPlate(winAnimationName, winType, startAnimationName = "start") {
|
|
533
|
+
this.rouletteWinContainer = this.createRouletteContainer(startAnimationName);
|
|
534
|
+
this.positionRoundWinContainer();
|
|
535
|
+
SoundManager.play(SoundTracks.jackpotWin);
|
|
536
|
+
await new Promise((resolve) => {
|
|
537
|
+
let idleCount = 0;
|
|
538
|
+
if (!this.rouletteWinContainer) {
|
|
539
|
+
resolve();
|
|
540
|
+
return;
|
|
541
|
+
}
|
|
542
|
+
this.addChild(this.rouletteWinContainer);
|
|
543
|
+
this.rouletteWinContainer.spine.state.setAnimation(0, startAnimationName, false);
|
|
544
|
+
this.rouletteWinContainer.spine.state.addListener({
|
|
545
|
+
complete: () => {
|
|
546
|
+
this.rouletteWinContainer?.spine.state.setAnimation(0, "idle", true);
|
|
547
|
+
this.rouletteWinContainer?.spine.state.setAnimation(0, winAnimationName, false);
|
|
548
|
+
this.rouletteWinContainer?.spine.state.addListener({
|
|
549
|
+
complete: () => {
|
|
550
|
+
idleCount++;
|
|
551
|
+
if (idleCount > 1) {
|
|
552
|
+
this.rouletteWinContainer?.spine.state.addListener({
|
|
553
|
+
complete: () => resolve()
|
|
554
|
+
});
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
});
|
|
558
|
+
}
|
|
559
|
+
});
|
|
560
|
+
});
|
|
561
|
+
this.destroyRouletteWin(winType);
|
|
562
|
+
this._frame.resetBonusIndicators("roulette");
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Function for disabling components for mobile portrait orientation.
|
|
566
|
+
*/
|
|
364
567
|
disableForMobile() {
|
|
365
|
-
if (this.logo)
|
|
568
|
+
if (this.logo) {
|
|
366
569
|
this.logo.renderable = false;
|
|
570
|
+
}
|
|
367
571
|
if (this.underFramePanel !== null) {
|
|
368
572
|
this.removeChild(this.underFramePanel);
|
|
369
573
|
this.underFramePanel = null;
|
|
@@ -374,6 +578,9 @@ export class AbstractMainContainer extends Container {
|
|
|
374
578
|
this.portraitPlayButtons = null;
|
|
375
579
|
}
|
|
376
580
|
}
|
|
581
|
+
/**
|
|
582
|
+
* Function for disabling components for landscape orientation.
|
|
583
|
+
*/
|
|
377
584
|
disableForLandscape() {
|
|
378
585
|
if (this.landscapePlayButtons !== null) {
|
|
379
586
|
this.removeChild(this.landscapePlayButtons);
|
|
@@ -381,6 +588,11 @@ export class AbstractMainContainer extends Container {
|
|
|
381
588
|
this.landscapePlayButtons = null;
|
|
382
589
|
}
|
|
383
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* Function for resizing the main container and its components.
|
|
593
|
+
* This function removes the current frame and any win containers,
|
|
594
|
+
* resizes the message box, background, animated front,
|
|
595
|
+
*/
|
|
384
596
|
resize() {
|
|
385
597
|
this.removeChild(this._frame);
|
|
386
598
|
if (this.bigWinContainer) {
|
|
@@ -395,11 +607,15 @@ export class AbstractMainContainer extends Container {
|
|
|
395
607
|
if (this.bonusWinContainer) {
|
|
396
608
|
this.removeChild(this.bonusWinContainer);
|
|
397
609
|
}
|
|
610
|
+
if (this.mysteryBonusContainer) {
|
|
611
|
+
this.removeChild(this.mysteryBonusContainer);
|
|
612
|
+
}
|
|
398
613
|
this.messageBox.resize();
|
|
399
614
|
this.background.resize();
|
|
400
615
|
this.animatedFront?.resize();
|
|
401
|
-
if (this.freeSpinButton)
|
|
616
|
+
if (this.freeSpinButton) {
|
|
402
617
|
this.freeSpinButton.resize();
|
|
618
|
+
}
|
|
403
619
|
this.addChild(this._frame);
|
|
404
620
|
this._frame.resize();
|
|
405
621
|
this.initComponentsForScreenRatio();
|
|
@@ -410,30 +626,75 @@ export class AbstractMainContainer extends Container {
|
|
|
410
626
|
RainMan.componentRegistry.get(BUTTONS.neg).flipDisabledFlag(true);
|
|
411
627
|
}
|
|
412
628
|
}
|
|
629
|
+
/**
|
|
630
|
+
* Function for creating the left buttons
|
|
631
|
+
* @returns {LeftButtons} - Returns a new instance of LeftButtons.
|
|
632
|
+
*/
|
|
413
633
|
createLeftButtons() {
|
|
414
634
|
return new LeftButtons();
|
|
415
635
|
}
|
|
636
|
+
/**
|
|
637
|
+
* Function for creating the right buttons
|
|
638
|
+
* @returns {RightButtons} - Returns a new instance of RightButtons.
|
|
639
|
+
*/
|
|
416
640
|
createRightButtons() {
|
|
417
641
|
return new RightButtons();
|
|
418
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Function for creating the left buttons for mobile portrait orientation
|
|
645
|
+
* @returns {LeftButtonsMobile} - Returns a new instance of LeftButtonsMobile for mobile portrait orientation.
|
|
646
|
+
*/
|
|
419
647
|
createLeftButtonsMobile() {
|
|
420
648
|
return new LeftButtonsMobile();
|
|
421
649
|
}
|
|
650
|
+
/**
|
|
651
|
+
* Function for creating the right buttons for mobile portrait orientation
|
|
652
|
+
* @returns {RightButtonsMobile} - Returns a new instance of RightButtonsMobile for mobile portrait orientation.
|
|
653
|
+
*/
|
|
422
654
|
createRightButtonsMobile() {
|
|
423
655
|
return new RightButtonsMobile();
|
|
424
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Function for creating the left buttons for landscape orientation
|
|
659
|
+
* @protected
|
|
660
|
+
* @returns {LeftButtonsLandscape} - Returns a new instance of LeftButtonsLandscape for landscape orientation.
|
|
661
|
+
*/
|
|
425
662
|
createLeftButtonsLandscape() {
|
|
426
663
|
return new LeftButtonsLandscape();
|
|
427
664
|
}
|
|
665
|
+
/**
|
|
666
|
+
* Function for creating the right buttons for landscape orientation
|
|
667
|
+
* @protected
|
|
668
|
+
* @returns {RightButtonsLandscape} - Returns a new instance of RightButtonsLandscape for landscape orientation.
|
|
669
|
+
*/
|
|
428
670
|
createRightButtonsLandscape() {
|
|
429
671
|
return new RightButtonsLandscape();
|
|
430
672
|
}
|
|
673
|
+
/**
|
|
674
|
+
* Function for creating the portrait play buttons
|
|
675
|
+
* @protected
|
|
676
|
+
* @returns {MiddleButtons} - Returns a new instance of MiddleButtons for portrait orientation.
|
|
677
|
+
*/
|
|
431
678
|
createPortraitPlayButtons() {
|
|
432
679
|
return new MiddleButtons();
|
|
433
680
|
}
|
|
681
|
+
/**
|
|
682
|
+
* Function for creating the landscape play buttons
|
|
683
|
+
* @protected
|
|
684
|
+
* @returns {MiddleButtons} - Returns a new instance of MiddleButtons for landscape orientation.
|
|
685
|
+
*/
|
|
434
686
|
createLandscapePlayButtons() {
|
|
435
687
|
return new MiddleButtons(true);
|
|
436
688
|
}
|
|
689
|
+
/**
|
|
690
|
+
* This method initializes the components for the current screen ratio.
|
|
691
|
+
* It checks the current device orientation and creates the appropriate left and right buttons.
|
|
692
|
+
* It also removes the previous left and right buttons from the container.
|
|
693
|
+
* It resizes the right buttons if the current orientation is "mobile-portrait".
|
|
694
|
+
* @protected
|
|
695
|
+
* @returns {void}
|
|
696
|
+
* @memberof AbstractMainContainer
|
|
697
|
+
*/
|
|
437
698
|
initComponentsForScreenRatio() {
|
|
438
699
|
const currentOrientation = getDeviceOrientation();
|
|
439
700
|
if (currentOrientation === "mobile-portrait") {
|
|
@@ -471,6 +732,13 @@ export class AbstractMainContainer extends Container {
|
|
|
471
732
|
this.addChild(this.rightButtons);
|
|
472
733
|
this._controller?.reinitializeAllButtons();
|
|
473
734
|
}
|
|
735
|
+
/**
|
|
736
|
+
* This method is used to resize all components that depend on the screen size.
|
|
737
|
+
* It resizes the frame, logo, left and right buttons, message box, play buttons,
|
|
738
|
+
* under frame panel, overlay, big win container, super bonus win container, bonus win container,
|
|
739
|
+
* mystery win container, gamble game, bottom panel, free spin plate, and
|
|
740
|
+
* free spin summary.
|
|
741
|
+
*/
|
|
474
742
|
resizeDependentComponents() {
|
|
475
743
|
const resizingHelper = globalMinRatio();
|
|
476
744
|
this._frame.resize();
|
|
@@ -509,6 +777,11 @@ export class AbstractMainContainer extends Container {
|
|
|
509
777
|
this.addChild(this.mysteryWinContainer);
|
|
510
778
|
this.mysteryWinContainer.resize();
|
|
511
779
|
}
|
|
780
|
+
if (this.mysteryBonusContainer) {
|
|
781
|
+
this.removeChild(this.mysteryBonusContainer);
|
|
782
|
+
this.mysteryBonusContainer.resize();
|
|
783
|
+
this.addChild(this.mysteryBonusContainer);
|
|
784
|
+
}
|
|
512
785
|
if (this.gambleGame) {
|
|
513
786
|
this.gambleGame.resize();
|
|
514
787
|
}
|
|
@@ -528,6 +801,10 @@ export class AbstractMainContainer extends Container {
|
|
|
528
801
|
}
|
|
529
802
|
RainMan.settingsStore.popupPaytableRepositionCallback?.();
|
|
530
803
|
}
|
|
804
|
+
/**
|
|
805
|
+
* This method is used to refresh the layers in the main container.
|
|
806
|
+
* It removes the existing layers and adds them back in the correct order.
|
|
807
|
+
*/
|
|
531
808
|
refreshLayers() {
|
|
532
809
|
this.removeChild(BackgroundLayer);
|
|
533
810
|
this.removeChild(FrameLayer);
|
|
@@ -9,7 +9,7 @@ export const BUTTONS = {
|
|
|
9
9
|
info: "infoButton",
|
|
10
10
|
more: "moreButton",
|
|
11
11
|
gamble: "gambleButton",
|
|
12
|
-
volume: "volumeButton"
|
|
12
|
+
volume: "volumeButton"
|
|
13
13
|
};
|
|
14
14
|
/**
|
|
15
15
|
* Button groups in Rainman Registry
|
|
@@ -18,7 +18,7 @@ export const BUTTONS = {
|
|
|
18
18
|
export const REGISTRY = {
|
|
19
19
|
leftButtons: "leftButtons",
|
|
20
20
|
middleButtons: "middleButtons",
|
|
21
|
-
rightButtons: "rightButtons"
|
|
21
|
+
rightButtons: "rightButtons"
|
|
22
22
|
};
|
|
23
23
|
/**
|
|
24
24
|
* Components names in Rainman Registry
|
|
@@ -32,4 +32,5 @@ export const COMPONENTS = {
|
|
|
32
32
|
bonusWin: "bonusWinText",
|
|
33
33
|
superBonusWin: "superBonusWinText",
|
|
34
34
|
autoSpinConfirm: "autoSpin-confirm",
|
|
35
|
+
mysteryWheelWin: "mysteryWheelWin"
|
|
35
36
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Spine } from "pixi-spine";
|
|
2
|
-
import { SpeedAdapterInterface, SpeedLevel, SpeedLevelDirectory } from "../../application";
|
|
2
|
+
import { SpeedAdapterInterface, SpeedLevel, SpeedLevelDirectory, WinTypeId } from "../../application";
|
|
3
3
|
import { Nullable } from "../../utils";
|
|
4
4
|
import { ResumableContainer } from "../common";
|
|
5
5
|
import { AbstractColumnsContainer } from "./AbstractColumnsContainer";
|
|
6
6
|
import { AbstractInnerFrame } from "./AbstractInnerFrame";
|
|
7
|
+
import { BonusIndicatorTypes } from "./constants";
|
|
7
8
|
import { MysteryFxCoordinates } from "./types";
|
|
8
9
|
import { WinLineAnimation } from "./WinLineAnimation";
|
|
9
10
|
/**
|
|
@@ -41,9 +42,11 @@ export declare abstract class AbstractFrame extends ResumableContainer implement
|
|
|
41
42
|
*/
|
|
42
43
|
invokeMysteryFx(x: number, y: number): void;
|
|
43
44
|
protected repositionMysteryFx(_x: number, _y: number): void;
|
|
45
|
+
playJackpotAnimation(_type: WinTypeId): void;
|
|
44
46
|
hideMysteryFx(): void;
|
|
45
47
|
private resetMysteryFxCoordinates;
|
|
46
48
|
destroyMysteryFx(): void;
|
|
49
|
+
resetBonusIndicators(_type: BonusIndicatorTypes): void;
|
|
47
50
|
/**
|
|
48
51
|
* Create win line animation, individual for each game, based on {@link WinLineAnimation}
|
|
49
52
|
*/
|
|
@@ -60,6 +60,7 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
60
60
|
this.addChild(this.mysteryFxHighlight);
|
|
61
61
|
}
|
|
62
62
|
repositionMysteryFx(_x, _y) { }
|
|
63
|
+
playJackpotAnimation(_type) { }
|
|
63
64
|
hideMysteryFx() {
|
|
64
65
|
if (!this.mysteryFxConfig)
|
|
65
66
|
return;
|
|
@@ -86,6 +87,7 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
86
87
|
this.mysteryFxHighlight = null;
|
|
87
88
|
}
|
|
88
89
|
}
|
|
90
|
+
resetBonusIndicators(_type) { }
|
|
89
91
|
/**
|
|
90
92
|
* Create win line animation, individual for each game, based on {@link WinLineAnimation}
|
|
91
93
|
*/
|
|
@@ -9,8 +9,16 @@ export declare const WIN_MULTIPLIER_VALUES: {
|
|
|
9
9
|
readonly HIGH_WIN_MAX: 15;
|
|
10
10
|
readonly VERY_HIGH_WIN: 15.1;
|
|
11
11
|
};
|
|
12
|
+
export declare const BONUS_INDICATORS: {
|
|
13
|
+
readonly joker: "joker";
|
|
14
|
+
readonly freeSpins: "freeSpins";
|
|
15
|
+
readonly mystery: "mystery";
|
|
16
|
+
readonly roulette: "roulette";
|
|
17
|
+
readonly multi: "multi";
|
|
18
|
+
};
|
|
12
19
|
/**
|
|
13
20
|
* Type for the win multiplier values.
|
|
14
21
|
* @typedef {WinMultiplierValues}
|
|
15
22
|
*/
|
|
16
23
|
export type WinMultiplierValues = (typeof WIN_MULTIPLIER_VALUES)[keyof typeof WIN_MULTIPLIER_VALUES];
|
|
24
|
+
export type BonusIndicatorTypes = (typeof BONUS_INDICATORS)[keyof typeof BONUS_INDICATORS];
|
|
@@ -7,5 +7,12 @@ export const WIN_MULTIPLIER_VALUES = {
|
|
|
7
7
|
MEDIUM_WIN_MAX: 5,
|
|
8
8
|
HIGH_WIN_MIN: 5.1,
|
|
9
9
|
HIGH_WIN_MAX: 15,
|
|
10
|
-
VERY_HIGH_WIN: 15.1
|
|
10
|
+
VERY_HIGH_WIN: 15.1
|
|
11
|
+
};
|
|
12
|
+
export const BONUS_INDICATORS = {
|
|
13
|
+
joker: "joker",
|
|
14
|
+
freeSpins: "freeSpins",
|
|
15
|
+
mystery: "mystery",
|
|
16
|
+
roulette: "roulette",
|
|
17
|
+
multi: "multi"
|
|
11
18
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container } from "pixi.js";
|
|
2
2
|
import { SpeedAdapterInterface, SpeedLevel, SymbolId } from "../../application";
|
|
3
3
|
import { DropTransformationDetails, SymbolReel } from "../../connectivity";
|
|
4
|
-
import { Nullable,
|
|
4
|
+
import { Nullable, PromiseResolverType } from "../../utils";
|
|
5
5
|
import { AbstractColumnsContainer, AbstractFrame } from "../frame";
|
|
6
6
|
import { AbstractSymbolBase } from "./AbstractSymbolBase";
|
|
7
7
|
import { AnimationTimeSettings, Phase } from "./types";
|
|
@@ -28,7 +28,7 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
28
28
|
private lastEnding;
|
|
29
29
|
private tween;
|
|
30
30
|
private wiggleTween;
|
|
31
|
-
resolveMysterySpeedUp: Nullable<
|
|
31
|
+
resolveMysterySpeedUp: Nullable<PromiseResolverType<void>>;
|
|
32
32
|
private resolver;
|
|
33
33
|
private shouldMoveToTop;
|
|
34
34
|
private droppingTweens;
|