pixi-rainman-game-engine 0.3.43-c → 0.3.44
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 -1
- package/dist/DescribedPlayableAction/DescribedPlayableAction.d.ts +3 -0
- package/dist/DescribedPlayableAction/DescribedPlayableAction.js +1 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +1 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +9 -0
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +1 -0
- package/dist/components/buttons/buttonGroups/MiddleButtons.js +3 -3
- package/dist/components/symbols/AbstractSymbolBase.d.ts +1 -0
- package/dist/components/symbols/AbstractSymbolBase.js +12 -0
- package/dist/controllers/AbstractController.d.ts +3 -0
- package/dist/controllers/AbstractController.js +10 -2
- package/dist/controllers/UiController.d.ts +1 -0
- package/dist/controllers/UiController.js +1 -0
- package/dist/stores/SettingsStore.d.ts +1 -0
- package/dist/stores/SettingsStore.js +1 -0
- package/package.json +1 -1
|
@@ -49,7 +49,8 @@ export class ComponentRegistry {
|
|
|
49
49
|
this.speedLevelHandler.setSpeed(newSpeedLevel);
|
|
50
50
|
RainMan.settingsStore.setSpeedLevel(this.speedLevelHandler.currentSpeed);
|
|
51
51
|
this.updateAllSpeedAdaptable(RainMan.settingsStore.currentSpeed);
|
|
52
|
-
this.
|
|
52
|
+
this.getIfExists(SpeedControlButton.registryName)?.forceTextureUpdate();
|
|
53
|
+
this.getIfExists(SpeedControlButtonMobile.registryName)?.forceTextureUpdate();
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
56
|
* Setting the next available speed level
|
|
@@ -10,5 +10,8 @@ export declare class DescribedPlayableAction<T> {
|
|
|
10
10
|
winAmount: Nullable<number>;
|
|
11
11
|
skipLooping: boolean;
|
|
12
12
|
isFirstStreak: boolean;
|
|
13
|
+
animationTarget: {
|
|
14
|
+
isCurrentAnimationPastProgressThreshold?: () => boolean;
|
|
15
|
+
} | null;
|
|
13
16
|
constructor(type: T, action: PlayableAction, winAmount?: Nullable<number>, skipLooping?: boolean);
|
|
14
17
|
}
|
|
@@ -154,6 +154,7 @@ export declare class ButtonsEventManager {
|
|
|
154
154
|
* @returns {void}
|
|
155
155
|
*/
|
|
156
156
|
private handleModalInvocation;
|
|
157
|
+
private closeAllModals;
|
|
157
158
|
/**
|
|
158
159
|
* Function for closing all other modals except the one with given name
|
|
159
160
|
* @param {string} activeLayerName - name of the layer that should remain open
|
|
@@ -62,6 +62,7 @@ export class ButtonsEventManager {
|
|
|
62
62
|
RainMan.settingsStore.handleModalInvocation = this.handleModalInvocation.bind(this);
|
|
63
63
|
RainMan.settingsStore.enableButtons = this.enableButtons.bind(this);
|
|
64
64
|
RainMan.settingsStore.closeOtherModals = this.closeOtherModals.bind(this);
|
|
65
|
+
RainMan.settingsStore.closeAllModals = this.closeAllModals.bind(this);
|
|
65
66
|
RainMan.settingsStore.closeCurrentlyOpenModal = this.closeCurrentlyOpenModal.bind(this);
|
|
66
67
|
}
|
|
67
68
|
/**
|
|
@@ -359,6 +360,14 @@ export class ButtonsEventManager {
|
|
|
359
360
|
}
|
|
360
361
|
}
|
|
361
362
|
}
|
|
363
|
+
closeAllModals() {
|
|
364
|
+
for (const itemId of allUiItems) {
|
|
365
|
+
const layer = window.document.getElementById(itemId);
|
|
366
|
+
if (layer !== null && layer.style.display === "flex") {
|
|
367
|
+
layer.style.display = "none";
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
362
371
|
/**
|
|
363
372
|
* Function for closing all other modals except the one with given name
|
|
364
373
|
* @param {string} activeLayerName - name of the layer that should remain open
|
|
@@ -252,6 +252,7 @@ export class AbstractMainContainer extends Container {
|
|
|
252
252
|
invokeBuyFreeSpinPlate() {
|
|
253
253
|
const refreshButton = RainMan.componentRegistry.get(RefreshButton.registryName);
|
|
254
254
|
refreshButton.flipDisabledFlag(true);
|
|
255
|
+
RainMan.settingsStore.closeAllModals?.();
|
|
255
256
|
this._buyFreeSpinsPlate = this.createBuyFreeSpinPlate();
|
|
256
257
|
if (!this._buyFreeSpinsPlate) {
|
|
257
258
|
refreshButton.flipDisabledFlag(false);
|
|
@@ -108,13 +108,13 @@ export class MiddleButtons extends ResponsiveContainer {
|
|
|
108
108
|
}
|
|
109
109
|
if (this.landscape) {
|
|
110
110
|
this.betButton.x = width / 2;
|
|
111
|
-
this.betButton.y = -
|
|
111
|
+
this.betButton.y = -25;
|
|
112
112
|
this.autoplayButton.x = width / 2;
|
|
113
|
-
this.autoplayButton.y = height +
|
|
113
|
+
this.autoplayButton.y = height + 35;
|
|
114
114
|
}
|
|
115
115
|
else {
|
|
116
116
|
this.autoplayButton.x = -width;
|
|
117
|
-
this.autoplayButton.y =
|
|
117
|
+
this.autoplayButton.y = 0;
|
|
118
118
|
this.betButton.x = width;
|
|
119
119
|
this.betButton.y = height;
|
|
120
120
|
}
|
|
@@ -98,6 +98,7 @@ export declare abstract class AbstractSymbolBase extends Container implements Sp
|
|
|
98
98
|
* @returns {Promise<void>} - A promise that resolves when the animation is complete
|
|
99
99
|
*/
|
|
100
100
|
play(suffix?: string): Promise<void>;
|
|
101
|
+
isCurrentAnimationPastProgressThreshold(): boolean;
|
|
101
102
|
/**
|
|
102
103
|
* Function for stopping the symbol animation.
|
|
103
104
|
* @public
|
|
@@ -214,6 +214,18 @@ export class AbstractSymbolBase extends Container {
|
|
|
214
214
|
});
|
|
215
215
|
});
|
|
216
216
|
}
|
|
217
|
+
isCurrentAnimationPastProgressThreshold() {
|
|
218
|
+
const entry = this.spine.state.tracks[0];
|
|
219
|
+
if (!entry) {
|
|
220
|
+
return false;
|
|
221
|
+
}
|
|
222
|
+
const trackTime = entry.trackTime ?? 0;
|
|
223
|
+
const animationEnd = entry.animationEnd ?? 0;
|
|
224
|
+
if (animationEnd <= 0) {
|
|
225
|
+
return false;
|
|
226
|
+
}
|
|
227
|
+
return trackTime >= animationEnd / 3;
|
|
228
|
+
}
|
|
217
229
|
/**
|
|
218
230
|
* Function for stopping the symbol animation.
|
|
219
231
|
* @public
|
|
@@ -57,6 +57,9 @@ export declare abstract class AbstractController<T> {
|
|
|
57
57
|
shouldStopMobileSpin: boolean;
|
|
58
58
|
disableMessageBoxChange: boolean;
|
|
59
59
|
shouldClearQuickReelsStopAfterSpin: boolean;
|
|
60
|
+
protected firstAnimationTarget: {
|
|
61
|
+
isCurrentAnimationPastProgressThreshold?: () => boolean;
|
|
62
|
+
} | null;
|
|
60
63
|
freeSpinsWin: Nullable<number>;
|
|
61
64
|
protected resolveBigWin?: () => void;
|
|
62
65
|
protected resolveMysteryWin?: () => void;
|
|
@@ -57,6 +57,7 @@ export class AbstractController {
|
|
|
57
57
|
shouldStopMobileSpin = false;
|
|
58
58
|
disableMessageBoxChange = false;
|
|
59
59
|
shouldClearQuickReelsStopAfterSpin = false;
|
|
60
|
+
firstAnimationTarget = null;
|
|
60
61
|
freeSpinsWin = null;
|
|
61
62
|
resolveBigWin;
|
|
62
63
|
resolveMysteryWin;
|
|
@@ -769,7 +770,7 @@ export class AbstractController {
|
|
|
769
770
|
return;
|
|
770
771
|
}
|
|
771
772
|
if (this.gamePhase === gamePhases.HANDLING_ACTIONS) {
|
|
772
|
-
this.shouldPlayNextSpin =
|
|
773
|
+
this.shouldPlayNextSpin = !RainMan.settingsStore.isFreeSpinsPlayEnabled;
|
|
773
774
|
}
|
|
774
775
|
if (this.mainContainer.mysteryWinVisibleFor) {
|
|
775
776
|
RainMan.componentRegistry.get(COMPONENTS.mysteryWin).stopUpdate();
|
|
@@ -916,7 +917,7 @@ export class AbstractController {
|
|
|
916
917
|
async useTakeAction() {
|
|
917
918
|
if (!RainMan.settingsStore.isTakeActionAvailable ||
|
|
918
919
|
RainMan.settingsStore.roundNumber === 0 ||
|
|
919
|
-
this._lastWinAmount === 0) {
|
|
920
|
+
(this._lastWinAmount === 0 && !RainMan.settingsStore.isAfterFreeSpinsSummary)) {
|
|
920
921
|
logInfo("Take action can't be performed");
|
|
921
922
|
return;
|
|
922
923
|
}
|
|
@@ -1168,6 +1169,8 @@ export class AbstractController {
|
|
|
1168
1169
|
this.uiController.limitWinAmount(spinLogic.winTotalAmount);
|
|
1169
1170
|
}
|
|
1170
1171
|
this.composeWinActionsQueue(spinLogic);
|
|
1172
|
+
this.firstAnimationTarget =
|
|
1173
|
+
this.winActionsQueue.find((action) => action.animationTarget)?.animationTarget ?? null;
|
|
1171
1174
|
if (spinLogic.winTotalAmount === 0 && this.invokeFreeSpinPlateAfterWin) {
|
|
1172
1175
|
this.uiController.messageBox.hideCurrentWinText();
|
|
1173
1176
|
}
|
|
@@ -1321,6 +1324,8 @@ export class AbstractController {
|
|
|
1321
1324
|
* @returns {Promise<void>} - promise that resolves when free spin plate is invoked
|
|
1322
1325
|
*/
|
|
1323
1326
|
async handleFreeSpinPlateInvocation(numberOfFreeSpins, isAdditionalFreeSpin = false) {
|
|
1327
|
+
RainMan.componentRegistry.getIfExists(SpeedControlButtonMobile.registryName)?.flipDisabledFlag(true);
|
|
1328
|
+
RainMan.componentRegistry.getIfExists(SpeedControlButton.registryName)?.flipDisabledFlag(true);
|
|
1324
1329
|
await this.buttonsEventManager.disableButtonsForAction(async () => {
|
|
1325
1330
|
await this.mainContainer.invokeFreeSpinPlate(numberOfFreeSpins ?? RainMan.settingsStore.totalNumberOfFreeSpins, isAdditionalFreeSpin);
|
|
1326
1331
|
});
|
|
@@ -1337,9 +1342,12 @@ export class AbstractController {
|
|
|
1337
1342
|
* @returns {Promise<void>} - promise that resolves when free spin summary plate is invoked
|
|
1338
1343
|
*/
|
|
1339
1344
|
async handleFreeSpinSummaryPlateInvocation() {
|
|
1345
|
+
this.shouldPlayNextSpin = false;
|
|
1340
1346
|
await this.buttonsEventManager.disableButtonsForAction(async () => {
|
|
1341
1347
|
this.uiController.messageBox.hideFreeSpinText();
|
|
1342
1348
|
this.uiController.messageBox.hideCurrentWinText();
|
|
1349
|
+
RainMan.componentRegistry.getIfExists(SpeedControlButtonMobile.registryName)?.flipDisabledFlag(true);
|
|
1350
|
+
RainMan.componentRegistry.getIfExists(SpeedControlButton.registryName)?.flipDisabledFlag(true);
|
|
1343
1351
|
await this.mainContainer.invokeFreeSpinSummary(this.uiController.totalNumberOfFreeSpins, this.uiController.totalFreeSpinWinAmount);
|
|
1344
1352
|
this.uiController.totalNumberOfFreeSpins = 0;
|
|
1345
1353
|
this.uiController.resetTotalFreeSpinWinAmount();
|
|
@@ -63,6 +63,7 @@ export declare class SettingsStore {
|
|
|
63
63
|
updateVolumeButtonTexture?: () => void;
|
|
64
64
|
handleModalInvocation?: (layerId: string) => void;
|
|
65
65
|
closeOtherModals?: (layerId: string) => void;
|
|
66
|
+
closeAllModals?: () => void;
|
|
66
67
|
closeCurrentlyOpenModal?: () => void;
|
|
67
68
|
handleInvokeFreeSpinPlate?: (freeSpinAmount: number, isAdditionalFreeSpin: boolean) => Promise<void>;
|
|
68
69
|
handleBuyFreeSpinPopupActivation?: () => void;
|
package/package.json
CHANGED