pixi-rainman-game-engine 0.1.48 → 0.1.50
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/Rainman/appConfig.js +3 -3
- package/dist/SettingsUI/components/SpeedSettingsPopup/speedSettingsPopup.css +28 -0
- package/dist/components/frame/AbstractColumnsContainer.js +5 -0
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +2 -0
- package/dist/components/symbols/AbstractSymbolsColumn.js +27 -0
- package/dist/components/symbols/DroppableSymbolsColumn.d.ts +2 -2
- package/dist/components/symbols/DroppableSymbolsColumn.js +2 -2
- package/dist/components/symbols/types.d.ts +1 -1
- package/dist/components/symbols/types.js +1 -1
- package/dist/controllers/AbstractController.d.ts +1 -0
- package/dist/controllers/AbstractController.js +23 -21
- package/package.json +1 -1
|
@@ -35,9 +35,9 @@ export const defaultAppConfig = {
|
|
|
35
35
|
freeSpinPlateVisibleTime: 2000,
|
|
36
36
|
freeSpinSummaryVisibleTime: 2000,
|
|
37
37
|
updatableTextCountingDuration: 500,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
38
|
+
mobileSpinTimeout: 100,
|
|
39
|
+
scatterDelayerTime: 1000,
|
|
40
|
+
scatterSpinningTime: 1200,
|
|
41
41
|
mysteryWinMinimumTime: 2000,
|
|
42
42
|
bigWinMinimumTime: 2000,
|
|
43
43
|
bigWinPhaseTimeout: 2800,
|
|
@@ -40,6 +40,15 @@
|
|
|
40
40
|
height: 78px;
|
|
41
41
|
background-repeat: no-repeat no-repeat;
|
|
42
42
|
background-size: contain;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.speed-settings-popup__option:hover {
|
|
47
|
+
background-image: url("/assets/settings/speedPopup/speed-frame-active.png");
|
|
48
|
+
width: 145px;
|
|
49
|
+
height: 78px;
|
|
50
|
+
background-repeat: no-repeat no-repeat;
|
|
51
|
+
background-size: contain;
|
|
43
52
|
}
|
|
44
53
|
|
|
45
54
|
.speed-settings-popup_option--active {
|
|
@@ -101,6 +110,25 @@
|
|
|
101
110
|
}
|
|
102
111
|
}
|
|
103
112
|
|
|
113
|
+
@media screen and (max-width: 450px) and (pointer: coarse) {
|
|
114
|
+
.speed-settings-popup__option {
|
|
115
|
+
width: 120px;
|
|
116
|
+
height: 66px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.speed-settings-popup__option:hover {
|
|
120
|
+
background-image: url("/assets/settings/speedPopup/speed-frame-active.png");
|
|
121
|
+
background-repeat: no-repeat no-repeat;
|
|
122
|
+
background-size: contain;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.speed-settings-popup__option:focus {
|
|
126
|
+
background-image: url("/assets/settings/speedPopup/speed-frame-active.png");
|
|
127
|
+
background-repeat: no-repeat no-repeat;
|
|
128
|
+
background-size: contain;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
104
132
|
@media only screen and (max-height: 450px) {
|
|
105
133
|
.speed-settings-modal {
|
|
106
134
|
width: 80vw;
|
|
@@ -83,10 +83,15 @@ export class AbstractColumnsContainer extends Container {
|
|
|
83
83
|
break;
|
|
84
84
|
}
|
|
85
85
|
const configureSpinAction = configuredBlindSpinsActions.shift();
|
|
86
|
+
indexesOfReelsToExtendSpinningTime.forEach((number) => {
|
|
87
|
+
this.allColumns[number].changeMultiplier();
|
|
88
|
+
});
|
|
86
89
|
if (configureSpinAction !== undefined) {
|
|
87
90
|
if (indexesOfReelsToExtendSpinningTime.includes(index)) {
|
|
88
91
|
this.currentColumn = this.allColumns[index];
|
|
92
|
+
this.currentColumn.adaptToSpeed(RainMan.settingsStore.currentSpeed);
|
|
89
93
|
frame.invokeMysteryFx(this.currentColumn.x, this.currentColumn.y);
|
|
94
|
+
await this.currentColumn.speedUpForMysterySpin(100, 1500);
|
|
90
95
|
this.skipScatterDelay = configureSpinAction;
|
|
91
96
|
setTimeout(() => {
|
|
92
97
|
this.skipScatterDelay?.();
|
|
@@ -51,6 +51,8 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
51
51
|
get id(): string;
|
|
52
52
|
protected get componentsTimingSettings(): AnimationTimeSettings;
|
|
53
53
|
adaptToSpeed(speedLevel: SpeedLevel): void;
|
|
54
|
+
changeMultiplier(): void;
|
|
55
|
+
speedUpForMysterySpin(velocity: number, duration: number): Promise<void>;
|
|
54
56
|
changeVelocity(velocity: number, duration: number, frame?: AbstractFrame): Promise<void>;
|
|
55
57
|
protected animateDependentComponents(_distance: number): void;
|
|
56
58
|
animate(delta: number, lastTime: number): void;
|
|
@@ -79,6 +79,24 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
79
79
|
this.velocityMultiplier = this.speedLevelMapper[speedLevel];
|
|
80
80
|
this.symbols.forEach((symbol) => symbol.updateTimeScaleOfSpine(this.velocityMultiplier));
|
|
81
81
|
}
|
|
82
|
+
changeMultiplier() {
|
|
83
|
+
this.velocityMultiplier = 3.5;
|
|
84
|
+
}
|
|
85
|
+
async speedUpForMysterySpin(velocity, duration) {
|
|
86
|
+
await new Promise((resolve) => {
|
|
87
|
+
this.tween = new TWEEN.Tween({ velocity: velocity })
|
|
88
|
+
.to({ value: 70 }, duration)
|
|
89
|
+
.easing(TWEEN.Easing.Linear.None)
|
|
90
|
+
.onUpdate((value) => {
|
|
91
|
+
this.velocity = value.velocity;
|
|
92
|
+
})
|
|
93
|
+
.onComplete(() => {
|
|
94
|
+
this.tween = null;
|
|
95
|
+
resolve();
|
|
96
|
+
})
|
|
97
|
+
.start();
|
|
98
|
+
});
|
|
99
|
+
}
|
|
82
100
|
async changeVelocity(velocity, duration, frame) {
|
|
83
101
|
await new Promise((resolve) => {
|
|
84
102
|
this.tween = new TWEEN.Tween({ velocity: velocity })
|
|
@@ -88,6 +106,15 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
88
106
|
.easing(TWEEN.Easing.Linear.None)
|
|
89
107
|
.to({ velocity }, duration)
|
|
90
108
|
.start()
|
|
109
|
+
.onComplete(async () => {
|
|
110
|
+
this.tween = null;
|
|
111
|
+
if (frame) {
|
|
112
|
+
await frame.hideMysteryFx();
|
|
113
|
+
frame.destroyMysteryFx();
|
|
114
|
+
}
|
|
115
|
+
this.skipHidingMysteryFx = false;
|
|
116
|
+
resolve();
|
|
117
|
+
})
|
|
91
118
|
.onStop(async () => {
|
|
92
119
|
this.tween = null;
|
|
93
120
|
if (frame) {
|
|
@@ -17,8 +17,8 @@ export declare class DroppableSymbolsColumn {
|
|
|
17
17
|
get symbolsToBeDestroyed(): DroppableSymbol[];
|
|
18
18
|
get allSymbolsToBeMovedDown(): DroppableSymbol[];
|
|
19
19
|
setSymbolsToBeDestroyed(rowIndex: number, replacementSymbol: SymbolId): void;
|
|
20
|
-
playAnimations(): Promise<void[]>;
|
|
21
|
-
destroyAnimations(isStandalone: boolean): Promise<void[]>;
|
|
20
|
+
playAnimations(): Promise<PromiseSettledResult<void>[]>;
|
|
21
|
+
destroyAnimations(isStandalone: boolean): Promise<PromiseSettledResult<void>[]>;
|
|
22
22
|
moveDestroyedSymbolsToTop(tileHeight: number): void;
|
|
23
23
|
swapDestroyedSymbols(): void;
|
|
24
24
|
/**
|
|
@@ -34,7 +34,7 @@ export class DroppableSymbolsColumn {
|
|
|
34
34
|
this.sortableSymbols[rowIndex].referencedYInColumn = rowIndex;
|
|
35
35
|
}
|
|
36
36
|
async playAnimations() {
|
|
37
|
-
return await Promise.
|
|
37
|
+
return await Promise.allSettled(this.symbolsToBeDestroyed.map((symbol) => symbol.symbol.play()));
|
|
38
38
|
}
|
|
39
39
|
async destroyAnimations(isStandalone) {
|
|
40
40
|
const destroyedSymbols = [];
|
|
@@ -43,7 +43,7 @@ export class DroppableSymbolsColumn {
|
|
|
43
43
|
destroyedSymbols.push(symbol.symbol.handlePopSymbol(isStandalone));
|
|
44
44
|
this._numberToBeDropped++;
|
|
45
45
|
});
|
|
46
|
-
return await Promise.
|
|
46
|
+
return await Promise.allSettled(destroyedSymbols);
|
|
47
47
|
}
|
|
48
48
|
moveDestroyedSymbolsToTop(tileHeight) {
|
|
49
49
|
this.symbolsToBeDestroyed.forEach((symbols, index) => {
|
|
@@ -49,6 +49,7 @@ export declare abstract class AbstractController<T> {
|
|
|
49
49
|
private componentRegistry;
|
|
50
50
|
protected skipFreeSpinSummary: boolean;
|
|
51
51
|
protected scatterCountForFx: number;
|
|
52
|
+
protected isLongPress: boolean;
|
|
52
53
|
protected _lastWinAmount: number;
|
|
53
54
|
protected constructor(buttonsEventManager: ButtonsEventManager, mainContainer: AbstractMainContainer, connection: SubscribableConnectionWrapper);
|
|
54
55
|
init(): void;
|
|
@@ -48,6 +48,7 @@ export class AbstractController {
|
|
|
48
48
|
componentRegistry;
|
|
49
49
|
skipFreeSpinSummary = false;
|
|
50
50
|
scatterCountForFx = 2;
|
|
51
|
+
isLongPress = false;
|
|
51
52
|
_lastWinAmount = 0;
|
|
52
53
|
constructor(buttonsEventManager, mainContainer, connection) {
|
|
53
54
|
this.buttonsEventManager = buttonsEventManager;
|
|
@@ -184,17 +185,25 @@ export class AbstractController {
|
|
|
184
185
|
const refreshButton = RainMan.componentRegistry.get(RefreshButton.registryName);
|
|
185
186
|
refreshButton.setOnClick(() => this.handleSpinLogic());
|
|
186
187
|
const clearMobileSpinTimeout = () => {
|
|
187
|
-
if (
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
188
|
+
if (this.mobileSpinTimeout) {
|
|
189
|
+
clearInterval(this.mobileSpinTimeout);
|
|
190
|
+
this.mobileSpinTimeout = null;
|
|
191
|
+
}
|
|
192
|
+
this.isLongPress = false;
|
|
191
193
|
};
|
|
192
194
|
refreshButton.on("touchstart", () => {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
195
|
+
this.isLongPress = false;
|
|
196
|
+
this.mobileSpinTimeout = setInterval(() => {
|
|
197
|
+
this.isLongPress = true;
|
|
198
|
+
this.throttledSpin();
|
|
199
|
+
}, RainMan.config.durationOfActions.mobileSpinTimeout);
|
|
200
|
+
});
|
|
201
|
+
refreshButton.on("touchend", () => {
|
|
202
|
+
if (this.isLongPress) {
|
|
203
|
+
this.handleSpinLogic();
|
|
204
|
+
}
|
|
205
|
+
clearMobileSpinTimeout();
|
|
196
206
|
});
|
|
197
|
-
refreshButton.on("touchend", () => clearMobileSpinTimeout());
|
|
198
207
|
refreshButton.on("globaltouchmove", (event) => {
|
|
199
208
|
if (event.target !== refreshButton)
|
|
200
209
|
clearMobileSpinTimeout();
|
|
@@ -437,7 +446,7 @@ export class AbstractController {
|
|
|
437
446
|
autoplaySpin() {
|
|
438
447
|
if (!RainMan.settingsStore.howManyAutoSpinsLeft)
|
|
439
448
|
return;
|
|
440
|
-
if (!RainMan.settingsStore.infinitySpinsEnabled
|
|
449
|
+
if (!RainMan.settingsStore.infinitySpinsEnabled) {
|
|
441
450
|
RainMan.settingsStore.decreaseAutoSpinsCount();
|
|
442
451
|
}
|
|
443
452
|
if (RainMan.settingsStore.howManyAutoSpinsLeft === 0) {
|
|
@@ -592,7 +601,7 @@ export class AbstractController {
|
|
|
592
601
|
this.unlockLogicAfterSpinning();
|
|
593
602
|
if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
|
|
594
603
|
this.uiController.increaseTotalFreeSpinWinAmount(spinLogic.winTotalAmountWithoutMystery);
|
|
595
|
-
this.uiController.limitWinAmount(
|
|
604
|
+
this.uiController.limitWinAmount(this.uiController.totalFreeSpinWinAmount);
|
|
596
605
|
}
|
|
597
606
|
else {
|
|
598
607
|
this.uiController.limitWinAmount(spinLogic.winTotalAmount);
|
|
@@ -713,12 +722,10 @@ export class AbstractController {
|
|
|
713
722
|
return;
|
|
714
723
|
const amount = customAmount || this.uiController.recentWin;
|
|
715
724
|
this.mainContainer.invokeBigWin();
|
|
716
|
-
this.changeGamePhase(gamePhases.BIG_WIN_INVOKED);
|
|
717
725
|
const animationTimeDivider = RainMan.settingsStore.currentSpeed === SPEED_LEVELS.fast ? 3 : 1;
|
|
718
726
|
await RainMan.componentRegistry
|
|
719
727
|
.get(COMPONENTS.bigWin)
|
|
720
728
|
.update(amount, RainMan.config.durationOfActions.updatableTextCountingDuration / animationTimeDivider);
|
|
721
|
-
this.changeGamePhase(gamePhases.STOPPING_HANDLING_ACTIONS);
|
|
722
729
|
await new Promise((resolve) => {
|
|
723
730
|
this.resolveBigWin = resolve;
|
|
724
731
|
setTimeout(() => {
|
|
@@ -727,7 +734,6 @@ export class AbstractController {
|
|
|
727
734
|
this.mainContainer.destroyBigWin();
|
|
728
735
|
this.resolveBigWin();
|
|
729
736
|
this.resolveBigWin = undefined;
|
|
730
|
-
this.changeGamePhase(gamePhases.IDLE);
|
|
731
737
|
}, RainMan.config.durationOfActions.bigWinPhaseTimeout / animationTimeDivider);
|
|
732
738
|
});
|
|
733
739
|
}
|
|
@@ -736,12 +742,10 @@ export class AbstractController {
|
|
|
736
742
|
return;
|
|
737
743
|
const amount = winAmount || this.uiController.recentWin;
|
|
738
744
|
this.mainContainer.invokeBonusWin();
|
|
739
|
-
this.changeGamePhase(gamePhases.BONUS_WIN_INVOKED);
|
|
740
745
|
const animationTimeDivider = RainMan.settingsStore.currentSpeed === SPEED_LEVELS.fast ? 3 : 1;
|
|
741
746
|
await RainMan.componentRegistry
|
|
742
747
|
.get(COMPONENTS.bonusWin)
|
|
743
748
|
.update(amount, RainMan.config.durationOfActions.updatableTextCountingDuration / animationTimeDivider);
|
|
744
|
-
this.changeGamePhase(gamePhases.STOPPING_HANDLING_ACTIONS);
|
|
745
749
|
await new Promise((resolve) => {
|
|
746
750
|
this.resolveBonusWin = resolve;
|
|
747
751
|
setTimeout(() => {
|
|
@@ -750,7 +754,6 @@ export class AbstractController {
|
|
|
750
754
|
this.mainContainer.destroyBonusWin();
|
|
751
755
|
this.resolveBonusWin();
|
|
752
756
|
this.resolveBonusWin = undefined;
|
|
753
|
-
this.changeGamePhase(gamePhases.IDLE);
|
|
754
757
|
}, RainMan.config.durationOfActions.bonusWinPhaseTimeout / animationTimeDivider);
|
|
755
758
|
});
|
|
756
759
|
}
|
|
@@ -759,12 +762,10 @@ export class AbstractController {
|
|
|
759
762
|
return;
|
|
760
763
|
const amount = winAmount || RainMan.settingsStore.cumulativeWinAmount;
|
|
761
764
|
this.mainContainer.invokeSuperBonusWin();
|
|
762
|
-
this.changeGamePhase(gamePhases.SUPER_BONUS_WIN_INVOKED);
|
|
763
765
|
const animationTimeDivider = RainMan.settingsStore.currentSpeed === SPEED_LEVELS.fast ? 3 : 1;
|
|
764
766
|
await RainMan.componentRegistry
|
|
765
767
|
.get(COMPONENTS.superBonusWin)
|
|
766
768
|
.update(amount, RainMan.config.durationOfActions.updatableTextCountingDuration / animationTimeDivider);
|
|
767
|
-
this.changeGamePhase(gamePhases.STOPPING_HANDLING_ACTIONS);
|
|
768
769
|
await new Promise((resolve) => {
|
|
769
770
|
this.resolveSuperBonusWin = resolve;
|
|
770
771
|
setTimeout(() => {
|
|
@@ -773,7 +774,6 @@ export class AbstractController {
|
|
|
773
774
|
this.mainContainer.destroySuperBonusWin();
|
|
774
775
|
this.resolveSuperBonusWin();
|
|
775
776
|
this.resolveSuperBonusWin = undefined;
|
|
776
|
-
this.changeGamePhase(gamePhases.IDLE);
|
|
777
777
|
}, RainMan.config.durationOfActions.superBonusWinPhaseTimeout / animationTimeDivider);
|
|
778
778
|
});
|
|
779
779
|
}
|
|
@@ -786,10 +786,12 @@ export class AbstractController {
|
|
|
786
786
|
.get(COMPONENTS.mysteryWin)
|
|
787
787
|
.randomizeSet(winAmount, RainMan.settingsStore.getMysteryPaytable(this.mysteryWinSymbol, quantity));
|
|
788
788
|
SoundManager.pause(SoundTracks.mysteryDrawLoop);
|
|
789
|
+
if (RainMan.settingsStore.isFreeSpinsPlayEnabled) {
|
|
790
|
+
this.uiController.limitWinAmount(this.uiController.totalFreeSpinWinAmount + winAmount);
|
|
791
|
+
this.uiController.increaseTotalFreeSpinWinAmount(winAmount);
|
|
792
|
+
}
|
|
789
793
|
this.updateUiValues(winAmount);
|
|
790
794
|
this._lastWinAmount += winAmount;
|
|
791
|
-
if (RainMan.settingsStore.isFreeSpinsPlayEnabled)
|
|
792
|
-
this.uiController.increaseTotalFreeSpinWinAmount(winAmount);
|
|
793
795
|
await new Promise((resolve) => {
|
|
794
796
|
this.resolveMysteryWin = resolve;
|
|
795
797
|
setTimeout(() => {
|
package/package.json
CHANGED