pixi-rainman-game-engine 0.1.50 → 0.1.51
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/SettingsUI/components/VolumeSettings/index.jsx +2 -2
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +3 -4
- package/dist/application/SoundManager/SoundManager.js +1 -1
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +3 -2
- package/dist/components/frame/AbstractColumnsContainer.js +2 -2
- package/dist/components/frame/AbstractFrame.d.ts +1 -1
- package/dist/components/frame/AbstractFrame.js +13 -19
- package/dist/components/symbols/AbstractSymbolsColumn.js +2 -2
- package/dist/controllers/AbstractController.d.ts +0 -1
- package/dist/controllers/AbstractController.js +8 -9
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ const onChange = (newVolumeLevel) => {
|
|
|
14
14
|
};
|
|
15
15
|
const onAfterChange = (newVolumeLevel) => {
|
|
16
16
|
RainMan.settingsStore.flipSoundsEnabled(newVolumeLevel);
|
|
17
|
-
if (RainMan.settingsStore.
|
|
18
|
-
SoundManager.
|
|
17
|
+
if (RainMan.settingsStore.isSoundEnabled()) {
|
|
18
|
+
SoundManager.resumeAll();
|
|
19
19
|
}
|
|
20
20
|
};
|
|
21
21
|
export const VolumeSettings = observer(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import i18n from "i18next";
|
|
2
2
|
import { sample } from "lodash";
|
|
3
|
-
import { SoundManager
|
|
3
|
+
import { SoundManager } 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 } from "../../utils";
|
|
@@ -193,9 +193,8 @@ export class ButtonsEventManager {
|
|
|
193
193
|
RainMan.settingsStore.setUpdateVolumeButtonTexture(() => RainMan.componentRegistry.get(VolumeButton.registryName).changeTextureDependOnVolume());
|
|
194
194
|
RainMan.componentRegistry.get(VolumeButton.registryName).setOnClick(() => {
|
|
195
195
|
RainMan.settingsStore.flipSoundsEnabled();
|
|
196
|
-
if (RainMan.settingsStore.
|
|
197
|
-
SoundManager.
|
|
198
|
-
}
|
|
196
|
+
if (RainMan.settingsStore.isSoundEnabled())
|
|
197
|
+
SoundManager.resumeAll();
|
|
199
198
|
RainMan.componentRegistry.get(VolumeButton.registryName).changeTextureDependOnVolume();
|
|
200
199
|
this.handleModalInvocation(UI_ITEMS.volume);
|
|
201
200
|
});
|
|
@@ -103,7 +103,7 @@ export class SoundManagerInstance {
|
|
|
103
103
|
this.musicCatalogue.forEach((sound, soundName) => {
|
|
104
104
|
if (sound.paused && sound.isPlaying)
|
|
105
105
|
sound.resume();
|
|
106
|
-
if (soundName === SoundTracks.music && sound.paused) {
|
|
106
|
+
if (RainMan.settingsStore.ambientMusicFlag && soundName === SoundTracks.music && sound.paused) {
|
|
107
107
|
sound.resume();
|
|
108
108
|
}
|
|
109
109
|
});
|
|
@@ -56,8 +56,8 @@ export class AbstractMainContainer extends Container {
|
|
|
56
56
|
this.name = AbstractMainContainer.registryName;
|
|
57
57
|
this.buttonsEventManager = new ButtonsEventManager();
|
|
58
58
|
this.messageBox = new MessageBox();
|
|
59
|
-
if (RainMan.settingsStore.
|
|
60
|
-
SoundManager.
|
|
59
|
+
if (RainMan.settingsStore.isSoundEnabled())
|
|
60
|
+
SoundManager.resumeAll();
|
|
61
61
|
RainMan.app.renderer.on("resize", () => this.resize());
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
@@ -193,6 +193,7 @@ export class AbstractMainContainer extends Container {
|
|
|
193
193
|
this.overlay.drawRect(0, 0, width, height);
|
|
194
194
|
this.overlay.eventMode = "static";
|
|
195
195
|
this.overlay.endFill();
|
|
196
|
+
this.overlay.interactive = true;
|
|
196
197
|
this.addChild(this.overlay);
|
|
197
198
|
}
|
|
198
199
|
hideOverlay() {
|
|
@@ -139,11 +139,11 @@ export class AbstractColumnsContainer extends Container {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
if (amount > WIN_MULTIPLIER_VALUES.MEDIUM_WIN_MIN * bet &&
|
|
142
|
-
amount
|
|
142
|
+
amount <= WIN_MULTIPLIER_VALUES.MEDIUM_WIN_MAX * bet) {
|
|
143
143
|
SoundManager.play(SoundTracks.mediumWin);
|
|
144
144
|
return;
|
|
145
145
|
}
|
|
146
|
-
if (amount > WIN_MULTIPLIER_VALUES.HIGH_WIN_MIN * bet && amount
|
|
146
|
+
if (amount > WIN_MULTIPLIER_VALUES.HIGH_WIN_MIN * bet && amount <= WIN_MULTIPLIER_VALUES.HIGH_WIN_MAX * bet) {
|
|
147
147
|
SoundManager.play(SoundTracks.highWin);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
@@ -37,7 +37,7 @@ export declare abstract class AbstractFrame extends ResumableContainer implement
|
|
|
37
37
|
adaptToSpeed(speedLevel: SpeedLevel): void;
|
|
38
38
|
invokeMysteryFx(x: number, y: number): void;
|
|
39
39
|
protected repositionMysteryFx(_x: number, _y: number): void;
|
|
40
|
-
hideMysteryFx():
|
|
40
|
+
hideMysteryFx(): void;
|
|
41
41
|
private resetMysteryFxCoordinates;
|
|
42
42
|
destroyMysteryFx(): void;
|
|
43
43
|
protected createWinLineAnimation(_animationName: string): WinLineAnimation | null;
|
|
@@ -54,31 +54,25 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
54
54
|
this.addChild(this.mysteryFxHighlight);
|
|
55
55
|
}
|
|
56
56
|
repositionMysteryFx(_x, _y) { }
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
this.mysteryFxHighlight.state.setAnimation(0, this.mysteryFxConfig.endAnimationName, false);
|
|
70
|
-
this.mysteryFxHighlight.state.addListener({
|
|
71
|
-
complete: () => resolve(),
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
});
|
|
57
|
+
hideMysteryFx() {
|
|
58
|
+
if (!this.mysteryFxConfig)
|
|
59
|
+
return;
|
|
60
|
+
if (!this.mysteryFxConfig.endAnimationName) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (this.mysteryFxHighlight) {
|
|
64
|
+
SoundManager.play(SoundTracks.mysteryFxEnd);
|
|
65
|
+
this.resetMysteryFxCoordinates();
|
|
66
|
+
this.mysteryFxHighlight.state.setAnimation(0, this.mysteryFxConfig.endAnimationName, false);
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
75
69
|
}
|
|
76
70
|
resetMysteryFxCoordinates() {
|
|
77
71
|
this.mysteryFxCoordinates = { x: 0, y: 0 };
|
|
78
72
|
}
|
|
79
73
|
destroyMysteryFx() {
|
|
80
74
|
if (this.mysteryFxHighlight) {
|
|
81
|
-
SoundManager.
|
|
75
|
+
SoundManager.stop(SoundTracks.mysteryFxLoop);
|
|
82
76
|
this.removeChild(this.mysteryFxHighlight);
|
|
83
77
|
this.mysteryFxHighlight.destroy();
|
|
84
78
|
this.mysteryFxHighlight = null;
|
|
@@ -109,7 +109,7 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
109
109
|
.onComplete(async () => {
|
|
110
110
|
this.tween = null;
|
|
111
111
|
if (frame) {
|
|
112
|
-
|
|
112
|
+
frame.hideMysteryFx();
|
|
113
113
|
frame.destroyMysteryFx();
|
|
114
114
|
}
|
|
115
115
|
this.skipHidingMysteryFx = false;
|
|
@@ -118,7 +118,7 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
118
118
|
.onStop(async () => {
|
|
119
119
|
this.tween = null;
|
|
120
120
|
if (frame) {
|
|
121
|
-
|
|
121
|
+
frame.hideMysteryFx();
|
|
122
122
|
frame.destroyMysteryFx();
|
|
123
123
|
}
|
|
124
124
|
this.skipHidingMysteryFx = false;
|
|
@@ -49,7 +49,6 @@ export declare abstract class AbstractController<T> {
|
|
|
49
49
|
private componentRegistry;
|
|
50
50
|
protected skipFreeSpinSummary: boolean;
|
|
51
51
|
protected scatterCountForFx: number;
|
|
52
|
-
protected isLongPress: boolean;
|
|
53
52
|
protected _lastWinAmount: number;
|
|
54
53
|
protected constructor(buttonsEventManager: ButtonsEventManager, mainContainer: AbstractMainContainer, connection: SubscribableConnectionWrapper);
|
|
55
54
|
init(): void;
|
|
@@ -48,7 +48,6 @@ export class AbstractController {
|
|
|
48
48
|
componentRegistry;
|
|
49
49
|
skipFreeSpinSummary = false;
|
|
50
50
|
scatterCountForFx = 2;
|
|
51
|
-
isLongPress = false;
|
|
52
51
|
_lastWinAmount = 0;
|
|
53
52
|
constructor(buttonsEventManager, mainContainer, connection) {
|
|
54
53
|
this.buttonsEventManager = buttonsEventManager;
|
|
@@ -189,19 +188,19 @@ export class AbstractController {
|
|
|
189
188
|
clearInterval(this.mobileSpinTimeout);
|
|
190
189
|
this.mobileSpinTimeout = null;
|
|
191
190
|
}
|
|
192
|
-
this.isLongPress = false;
|
|
193
191
|
};
|
|
194
192
|
refreshButton.on("touchstart", () => {
|
|
195
|
-
this.isLongPress = false;
|
|
196
193
|
this.mobileSpinTimeout = setInterval(() => {
|
|
197
|
-
this.
|
|
198
|
-
|
|
194
|
+
if (this.invokeFreeSpinPlateAfterWin ||
|
|
195
|
+
this.invokeFreeSpinSummaryPlateAfterWin ||
|
|
196
|
+
this.resolveBigWin !== undefined) {
|
|
197
|
+
clearMobileSpinTimeout();
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
this.handleSpinLogic();
|
|
199
201
|
}, RainMan.config.durationOfActions.mobileSpinTimeout);
|
|
200
202
|
});
|
|
201
203
|
refreshButton.on("touchend", () => {
|
|
202
|
-
if (this.isLongPress) {
|
|
203
|
-
this.handleSpinLogic();
|
|
204
|
-
}
|
|
205
204
|
clearMobileSpinTimeout();
|
|
206
205
|
});
|
|
207
206
|
refreshButton.on("globaltouchmove", (event) => {
|
|
@@ -845,7 +844,7 @@ export class AbstractController {
|
|
|
845
844
|
}
|
|
846
845
|
}
|
|
847
846
|
async handleLoopingWinActionQueue() {
|
|
848
|
-
if (RainMan.settingsStore.isAutoplayEnabled)
|
|
847
|
+
if (RainMan.settingsStore.isAutoplayEnabled || this.invokeFreeSpinPlateAfterWin)
|
|
849
848
|
return;
|
|
850
849
|
this.isLoopingWinActionsQueue = true;
|
|
851
850
|
await this.loopWinActionsQueue();
|
package/package.json
CHANGED