pixi-rainman-game-engine 0.2.12 → 0.2.14
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/application/SoundManager/types.d.ts +2 -0
- package/dist/application/SoundManager/types.js +2 -0
- package/dist/components/frame/AbstractColumnsContainer.d.ts +2 -2
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +7 -5
- package/dist/components/symbols/AbstractSymbolsColumn.js +17 -1
- package/dist/controllers/AbstractController.js +6 -2
- package/package.json +1 -1
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* @property {string} mediumWin - on medium win - this sound is played when win of all streaks is more than x1.1 * bet and less than x5 * bet
|
|
27
27
|
* @property {string} highWin - on high win - this sound is played when win of all streaks is more than x5.1 * bet and less than x15 * bet
|
|
28
28
|
* @property {string} veryHighWin - on very high win - this sound is played when win of all streaks is more than x15.1 * bet
|
|
29
|
+
* @property {string} mysterySymbol - on mystery symbol appearance on the screen
|
|
29
30
|
* @typedef {SoundTracks}
|
|
30
31
|
*/
|
|
31
32
|
export declare const SoundTracks: SoundTracks;
|
|
@@ -55,6 +56,7 @@ export interface SoundTracks {
|
|
|
55
56
|
specialSymbolOnReel: "specialSymbolOnReel";
|
|
56
57
|
start: "start";
|
|
57
58
|
symbol: "symbol";
|
|
59
|
+
mysterySymbol: "mysterySymbol";
|
|
58
60
|
}
|
|
59
61
|
export type SoundTrack = SoundTracks[keyof SoundTracks];
|
|
60
62
|
/**
|
|
@@ -26,6 +26,7 @@
|
|
|
26
26
|
* @property {string} mediumWin - on medium win - this sound is played when win of all streaks is more than x1.1 * bet and less than x5 * bet
|
|
27
27
|
* @property {string} highWin - on high win - this sound is played when win of all streaks is more than x5.1 * bet and less than x15 * bet
|
|
28
28
|
* @property {string} veryHighWin - on very high win - this sound is played when win of all streaks is more than x15.1 * bet
|
|
29
|
+
* @property {string} mysterySymbol - on mystery symbol appearance on the screen
|
|
29
30
|
* @typedef {SoundTracks}
|
|
30
31
|
*/
|
|
31
32
|
export const SoundTracks = {
|
|
@@ -54,4 +55,5 @@ export const SoundTracks = {
|
|
|
54
55
|
specialSymbolOnReel: "specialSymbolOnReel",
|
|
55
56
|
start: "start",
|
|
56
57
|
symbol: "symbol",
|
|
58
|
+
mysterySymbol: "mysterySymbol",
|
|
57
59
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Container, Graphics } from "pixi.js";
|
|
2
2
|
import { SoundTrack, SpeedAdapterInterface, SpeedLevel, SymbolId } from "../../application";
|
|
3
3
|
import { DropTransformationDetails, StreakReelsIndexes, SymbolReels } from "../../connectivity";
|
|
4
|
-
import { PlayableAction } from "../../utils";
|
|
4
|
+
import { Nullable, PlayableAction } from "../../utils";
|
|
5
5
|
import { AbstractSymbolsColumn } from "../symbols";
|
|
6
6
|
/**
|
|
7
7
|
* Class represents columns container in game
|
|
@@ -18,7 +18,7 @@ export declare abstract class AbstractColumnsContainer extends Container impleme
|
|
|
18
18
|
protected allColumns: AbstractSymbolsColumn[];
|
|
19
19
|
private velocityMultiplier;
|
|
20
20
|
private skipScatterDelay;
|
|
21
|
-
|
|
21
|
+
currentColumn: Nullable<AbstractSymbolsColumn>;
|
|
22
22
|
private playedSounds;
|
|
23
23
|
quickReelsStop: boolean;
|
|
24
24
|
protected playLineSoundOnEachStreak: boolean;
|
|
@@ -4,7 +4,7 @@ import { DropTransformationDetails, SymbolReel } from "../../connectivity";
|
|
|
4
4
|
import { Nullable, VoidPromiseResolver } from "../../utils";
|
|
5
5
|
import { AbstractColumnsContainer, AbstractFrame } from "../frame";
|
|
6
6
|
import { AbstractSymbolBase } from "./AbstractSymbolBase";
|
|
7
|
-
import { AnimationTimeSettings } from "./types";
|
|
7
|
+
import { AnimationTimeSettings, Phase } from "./types";
|
|
8
8
|
/**
|
|
9
9
|
* Class represent single column in {@link ColumnsContainer}. It contains array of {@link AbstractSymbolBase}
|
|
10
10
|
* @abstract
|
|
@@ -18,12 +18,12 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
18
18
|
allSymbols: SymbolId[];
|
|
19
19
|
spinning: boolean;
|
|
20
20
|
speedLevelMapper: import("../../application").SpeedLevelDirectory<number>;
|
|
21
|
-
|
|
21
|
+
symbols: Array<AbstractSymbolBase>;
|
|
22
22
|
private velocity;
|
|
23
23
|
protected velocityMultiplier: number;
|
|
24
24
|
private previousVelocityMultiplier;
|
|
25
25
|
private spritesCount;
|
|
26
|
-
|
|
26
|
+
protected phase: Phase;
|
|
27
27
|
private ending;
|
|
28
28
|
private lastEnding;
|
|
29
29
|
private tween;
|
|
@@ -34,11 +34,12 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
34
34
|
private droppingTweens;
|
|
35
35
|
private movingDownSymbols;
|
|
36
36
|
private droppingDownSymbols;
|
|
37
|
-
|
|
37
|
+
protected topMostSymbol: Nullable<AbstractSymbolBase>;
|
|
38
38
|
private triggerNextColumn;
|
|
39
39
|
private triggerNextColumnPromise;
|
|
40
40
|
private spinEndPromise;
|
|
41
41
|
skipHidingMysteryFx: boolean;
|
|
42
|
+
protected mysterySymbol: Nullable<SymbolId>;
|
|
42
43
|
protected bonusSymbol: Nullable<SymbolId>;
|
|
43
44
|
protected frozenSymbol: Nullable<AbstractSymbolBase>;
|
|
44
45
|
private readonly _id;
|
|
@@ -68,6 +69,7 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
68
69
|
private changePhase;
|
|
69
70
|
private moveToTop;
|
|
70
71
|
protected shouldPlaySpecialRollStopSound(): boolean;
|
|
72
|
+
private shouldPlayMysteryStopSound;
|
|
71
73
|
handleStopping(): void;
|
|
72
74
|
protected abstract createNewSymbol(): AbstractSymbolBase;
|
|
73
75
|
private initSymbolSprites;
|
|
@@ -77,7 +79,7 @@ export declare abstract class AbstractSymbolsColumn extends Container implements
|
|
|
77
79
|
private ensureTopOffset;
|
|
78
80
|
private swapSymbolFace;
|
|
79
81
|
private fixZOrder;
|
|
80
|
-
|
|
82
|
+
protected doStop(): Promise<void>;
|
|
81
83
|
private stopSymbols;
|
|
82
84
|
protected getSymbolsSortedByYPosition(): AbstractSymbolBase[];
|
|
83
85
|
/**
|
|
@@ -41,6 +41,7 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
41
41
|
triggerNextColumnPromise = null;
|
|
42
42
|
spinEndPromise = null;
|
|
43
43
|
skipHidingMysteryFx = false;
|
|
44
|
+
mysterySymbol = null;
|
|
44
45
|
bonusSymbol = null;
|
|
45
46
|
frozenSymbol = null;
|
|
46
47
|
_id;
|
|
@@ -344,14 +345,29 @@ export class AbstractSymbolsColumn extends Container {
|
|
|
344
345
|
.flat()
|
|
345
346
|
.filter((symbol) => symbol && symbol.id === this.bonusSymbol).length >= 1);
|
|
346
347
|
}
|
|
348
|
+
shouldPlayMysteryStopSound() {
|
|
349
|
+
return (Array.from({ length: RainMan.config.numberOfColumns }, (_, i) => i)
|
|
350
|
+
.map((i) => {
|
|
351
|
+
const column = this.columnsContainer.getColumnAtPosition(i);
|
|
352
|
+
if (column !== this)
|
|
353
|
+
return null;
|
|
354
|
+
return column.symbols.slice(0, RainMan.config.numberOfRows);
|
|
355
|
+
})
|
|
356
|
+
.flat()
|
|
357
|
+
.filter((symbol) => symbol && symbol.id === this.mysterySymbol).length >= 1);
|
|
358
|
+
}
|
|
347
359
|
handleStopping() {
|
|
348
360
|
if (!this.topMostSymbol || this.phase === Phase.END)
|
|
349
361
|
return;
|
|
350
362
|
if (this.topMostSymbol.y >= this.tileHeight / 2) {
|
|
351
363
|
if (!this.columnsContainer.quickReelsStop &&
|
|
352
364
|
RainMan.settingsStore.currentSpeed !== SPEED_LEVELS.fast &&
|
|
353
|
-
!this.areAnyFrozenTiles())
|
|
365
|
+
!this.areAnyFrozenTiles()) {
|
|
354
366
|
SoundManager.play(this.shouldPlaySpecialRollStopSound() ? SoundTracks.specialSymbolOnReel : SoundTracks.rollStop);
|
|
367
|
+
if (this.shouldPlayMysteryStopSound()) {
|
|
368
|
+
SoundManager.play(SoundTracks.mysterySymbol);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
355
371
|
this.fixStationaryPositions();
|
|
356
372
|
this.doStop();
|
|
357
373
|
return;
|
|
@@ -585,10 +585,14 @@ export class AbstractController {
|
|
|
585
585
|
*/
|
|
586
586
|
async spin() {
|
|
587
587
|
RainMan.globals.shouldShowModals = false;
|
|
588
|
-
if (this.uiController.currentBalance < RainMan.settingsStore.bet
|
|
588
|
+
if (this.uiController.currentBalance < RainMan.settingsStore.bet &&
|
|
589
|
+
!RainMan.settingsStore.isFreeSpinsPlayEnabled) {
|
|
589
590
|
try {
|
|
590
|
-
|
|
591
|
+
if (RainMan.settingsStore.isAutoplayEnabled) {
|
|
592
|
+
this.disableAutoplay();
|
|
593
|
+
}
|
|
591
594
|
this.handleDisablingButtons(false);
|
|
595
|
+
return;
|
|
592
596
|
}
|
|
593
597
|
catch (e) {
|
|
594
598
|
RainMan.componentRegistry.get(AutoplayButton.registryName).flipDisabledFlag(true);
|
package/package.json
CHANGED