pixi-rainman-game-engine 0.1.27 → 0.1.29
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 +4 -1
- package/dist/Rainman/appConfig.js +1 -0
- package/dist/Rainman/types.d.ts +2 -0
- package/dist/SettingsUI/components/AutoplaySettings/autoplaySettings.css +1 -1
- package/dist/SettingsUI/components/Bet/bet.css +7 -6
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +2 -0
- package/dist/application/SoundManager/types.d.ts +2 -0
- package/dist/application/SoundManager/types.js +1 -0
- package/dist/components/buttons/default/VolumeButton.d.ts +1 -1
- package/dist/components/buttons/default/VolumeButton.js +1 -1
- package/dist/components/buttons/registrynames.d.ts +1 -0
- package/dist/components/buttons/registrynames.js +1 -0
- package/dist/components/frame/AbstractColumnsContainer.js +3 -3
- package/dist/components/messageBox/MessageBox.js +4 -0
- package/dist/controllers/AbstractController.d.ts +1 -0
- package/dist/controllers/AbstractController.js +9 -0
- package/dist/controllers/QuickStopController.d.ts +1 -0
- package/dist/controllers/QuickStopController.js +4 -0
- package/dist/controllers/UiController.js +2 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isIncentiveComponentInterface, isSpeedAdapterInterface, SpeedLevelHandler, TimedIncentiveController, } from "../application";
|
|
1
|
+
import { isIncentiveComponentInterface, isSpeedAdapterInterface, SPEED_LEVELS, SpeedLevelHandler, TimedIncentiveController, } from "../application";
|
|
2
2
|
import { SpeedControlButton } from "../components";
|
|
3
3
|
import { RainMan } from "../Rainman";
|
|
4
4
|
import { openFullscreen } from "../utils";
|
|
@@ -52,6 +52,9 @@ export class ComponentRegistry {
|
|
|
52
52
|
*/
|
|
53
53
|
nextSpeedLevel() {
|
|
54
54
|
this.speedLevelHandler.nextSpeed();
|
|
55
|
+
if (this.speedLevelHandler.currentSpeed !== SPEED_LEVELS.slow) {
|
|
56
|
+
RainMan.globals.disableSpeedPopup?.(false);
|
|
57
|
+
}
|
|
55
58
|
RainMan.settingsStore.setSpeedLevel(this.speedLevelHandler.currentSpeed);
|
|
56
59
|
this.updateAllSpeedAdaptable(RainMan.settingsStore.currentSpeed);
|
|
57
60
|
this.get(SpeedControlButton.registryName).forceTextureUpdate();
|
|
@@ -15,6 +15,7 @@ export const defaultAppConfig = {
|
|
|
15
15
|
updatableTextValueColor: new Color(0xffffff).toHex(),
|
|
16
16
|
autoplayGlowColor: new Color(0xff3000).toNumber(),
|
|
17
17
|
fontFace: ["HelveticaNeueLTStd"],
|
|
18
|
+
disableFreeSpinText: false,
|
|
18
19
|
winLineIndicatorSymbolScale: 0.75,
|
|
19
20
|
durationOfActions: {
|
|
20
21
|
eachColumnsSpinDelay: [0, 200, 700, 1200, 1800],
|
package/dist/Rainman/types.d.ts
CHANGED
|
@@ -22,6 +22,7 @@ export type OptionalAppConfig = {
|
|
|
22
22
|
mobileFontFace?: string[];
|
|
23
23
|
autoplayGlowColor: number;
|
|
24
24
|
winLineIndicatorSymbolScale: number;
|
|
25
|
+
disableFreeSpinText: boolean;
|
|
25
26
|
durationOfActions: {
|
|
26
27
|
eachColumnsSpinDelay: number[];
|
|
27
28
|
spinBaseTime: number;
|
|
@@ -56,5 +57,6 @@ export type OptionalAppConfig = {
|
|
|
56
57
|
export type AppConfig = RequiredAppConfig & DeepPartial<OptionalAppConfig>;
|
|
57
58
|
export interface Globals {
|
|
58
59
|
currency: Currency;
|
|
60
|
+
disableSpeedPopup?: (value: boolean) => void;
|
|
59
61
|
throttledSpin?: () => void;
|
|
60
62
|
}
|
|
@@ -11,16 +11,17 @@
|
|
|
11
11
|
display: flex;
|
|
12
12
|
align-items: center;
|
|
13
13
|
justify-content: center;
|
|
14
|
-
width:
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
min-width: 140px;
|
|
15
|
+
width: fit-content;
|
|
16
|
+
text-align: center;
|
|
17
|
+
height: fit-content;
|
|
18
|
+
border-radius: 32px;
|
|
17
19
|
border: 2px white;
|
|
18
20
|
border-style: solid;
|
|
19
|
-
margin: 0px 10px;
|
|
20
21
|
}
|
|
21
22
|
|
|
22
23
|
.bet-container__value p {
|
|
23
|
-
font-size:
|
|
24
|
+
font-size: 24px;
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
.bet-container__button {
|
|
@@ -44,7 +45,7 @@
|
|
|
44
45
|
|
|
45
46
|
.bet-container__controls {
|
|
46
47
|
display: flex;
|
|
47
|
-
|
|
48
|
+
gap: 8px;
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
.bet-container__button:active {
|
|
@@ -70,6 +70,7 @@ export class ButtonsEventManager {
|
|
|
70
70
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.normal);
|
|
71
71
|
this.setSpeedPopupVisibility("none");
|
|
72
72
|
messageBox.updateIncentiveText(i18n.t("rabbitSelected"));
|
|
73
|
+
RainMan.globals.disableSpeedPopup?.(true);
|
|
73
74
|
});
|
|
74
75
|
}
|
|
75
76
|
}
|
|
@@ -80,6 +81,7 @@ export class ButtonsEventManager {
|
|
|
80
81
|
RainMan.componentRegistry.setSpeedLevel(SPEED_LEVELS.fast);
|
|
81
82
|
this.setSpeedPopupVisibility("none");
|
|
82
83
|
messageBox.updateIncentiveText(i18n.t("cheetahSelected"));
|
|
84
|
+
RainMan.globals.disableSpeedPopup?.(true);
|
|
83
85
|
});
|
|
84
86
|
}
|
|
85
87
|
}
|
|
@@ -13,6 +13,7 @@ export interface SoundTracks {
|
|
|
13
13
|
mysteryFxEnd: "mysteryFxEnd";
|
|
14
14
|
mysteryFxLoop: "mysteryFxLoop";
|
|
15
15
|
line: "line";
|
|
16
|
+
freeLine: "freeLine";
|
|
16
17
|
mysteryDrawLoop: "mysteryDrawLoop";
|
|
17
18
|
rollStop: "rollStop";
|
|
18
19
|
specialSymbolOnReel: "specialSymbolOnReel";
|
|
@@ -36,6 +37,7 @@ export type SoundTrack = SoundTracks[keyof SoundTracks];
|
|
|
36
37
|
* @property {string} mysteryFxEnd - on mystery fx hides
|
|
37
38
|
* @property {string} mysteryFxLoop - when mystery fx in visible in loop
|
|
38
39
|
* @property {string} line - default win line sound, for both single and multiple lines
|
|
40
|
+
* @property {string} freeLine - win line sound for free spins
|
|
39
41
|
* @property {string} mysteryDrawLoop - on show mystery popup, play during randomizing win
|
|
40
42
|
* @property {string} rollStop - single reel stopping
|
|
41
43
|
* @property {string} specialSymbolOnReel - single reel stopping with special symbol like bonus or mystery
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
2
|
export declare class VolumeButton extends BaseButton {
|
|
3
|
-
static readonly registryName = "
|
|
3
|
+
static readonly registryName = "volumeButton";
|
|
4
4
|
private readonly normalTextureMap;
|
|
5
5
|
private readonly muteTextureMap;
|
|
6
6
|
constructor();
|
|
@@ -2,7 +2,7 @@ import { RainMan } from "../../../Rainman";
|
|
|
2
2
|
import { getTexture } from "../../../utils";
|
|
3
3
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
4
4
|
export class VolumeButton extends BaseButton {
|
|
5
|
-
static registryName = "
|
|
5
|
+
static registryName = "volumeButton";
|
|
6
6
|
normalTextureMap;
|
|
7
7
|
muteTextureMap;
|
|
8
8
|
constructor() {
|
|
@@ -123,8 +123,8 @@ export class AbstractColumnsContainer extends Container {
|
|
|
123
123
|
promises.push(promise);
|
|
124
124
|
});
|
|
125
125
|
});
|
|
126
|
-
SoundManager.play(SoundTracks.line);
|
|
127
|
-
await Promise.
|
|
126
|
+
SoundManager.play(RainMan.settingsStore.isFreeSpinsPlayEnabled ? SoundTracks.freeLine : SoundTracks.line);
|
|
127
|
+
await Promise.allSettled(promises);
|
|
128
128
|
}
|
|
129
129
|
resetPlayedSounds() {
|
|
130
130
|
this.playedSounds = [];
|
|
@@ -140,7 +140,7 @@ export class AbstractColumnsContainer extends Container {
|
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
if (this.playLineSoundOnEachStreak)
|
|
143
|
-
SoundManager.play(SoundTracks.line);
|
|
143
|
+
SoundManager.play(RainMan.settingsStore.isFreeSpinsPlayEnabled ? SoundTracks.freeLine : SoundTracks.line);
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
146
146
|
* Function for playing animation of streak
|
|
@@ -100,6 +100,8 @@ export class MessageBox extends Container {
|
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
showCurrentWinText() {
|
|
103
|
+
if (RainMan.settingsStore.isFreeSpinsPlayEnabled && RainMan.config.disableFreeSpinText)
|
|
104
|
+
return;
|
|
103
105
|
this.hideIncentiveText();
|
|
104
106
|
if (this.currentWinShown)
|
|
105
107
|
return;
|
|
@@ -117,6 +119,8 @@ export class MessageBox extends Container {
|
|
|
117
119
|
this.addChild(this.autoSpinText);
|
|
118
120
|
}
|
|
119
121
|
showFreeSpinText() {
|
|
122
|
+
if (RainMan.config.disableFreeSpinText)
|
|
123
|
+
return;
|
|
120
124
|
this.hideIncentiveText();
|
|
121
125
|
this.hideAutoSpinText();
|
|
122
126
|
this.hideWinLineIndicator();
|
|
@@ -45,6 +45,7 @@ export declare abstract class AbstractController<T> {
|
|
|
45
45
|
private setupSpaceOrEnterListener;
|
|
46
46
|
private disableBetButtons;
|
|
47
47
|
private disableSpeedButton;
|
|
48
|
+
private disableInformationButtons;
|
|
48
49
|
protected handleDisablingButtons(disabled?: boolean): void;
|
|
49
50
|
private initButtons;
|
|
50
51
|
private initBetButtons;
|
|
@@ -109,9 +109,18 @@ export class AbstractController {
|
|
|
109
109
|
disableSpeedButton(shouldBeDisabled) {
|
|
110
110
|
RainMan.componentRegistry.get(SpeedControlButton.registryName).flipDisabledFlag(shouldBeDisabled);
|
|
111
111
|
}
|
|
112
|
+
disableInformationButtons(shouldBeDisabled) {
|
|
113
|
+
const buttonsToChange = [
|
|
114
|
+
RainMan.componentRegistry.get(BUTTONS.info),
|
|
115
|
+
RainMan.componentRegistry.get(BUTTONS.more),
|
|
116
|
+
RainMan.componentRegistry.get(BUTTONS.volume),
|
|
117
|
+
];
|
|
118
|
+
buttonsToChange.forEach((button) => button.flipDisabledFlag(shouldBeDisabled));
|
|
119
|
+
}
|
|
112
120
|
handleDisablingButtons(disabled) {
|
|
113
121
|
this.disableBetButtons(disabled ?? this.shouldBetButtonsBeDisabled);
|
|
114
122
|
this.disableSpeedButton(disabled ?? this.shouldButtonsBeDisabled);
|
|
123
|
+
this.disableInformationButtons(disabled ?? this.shouldButtonsBeDisabled);
|
|
115
124
|
}
|
|
116
125
|
initButtons() {
|
|
117
126
|
this.buttonsEventManager.initVolumeButtonEvent();
|
|
@@ -8,5 +8,6 @@ export declare class QuickStopController {
|
|
|
8
8
|
constructor(buttonsEventManager: ButtonsEventManager);
|
|
9
9
|
handleInvokingSpeedPopup(): void;
|
|
10
10
|
handleSpeedPopupInvocation(): void;
|
|
11
|
+
setSpeedPopupDisabled(value: boolean): void;
|
|
11
12
|
handleResetCounter(shouldReset: boolean): void;
|
|
12
13
|
}
|
|
@@ -9,6 +9,7 @@ export class QuickStopController {
|
|
|
9
9
|
speedPopupDisabled = false;
|
|
10
10
|
constructor(buttonsEventManager) {
|
|
11
11
|
this.buttonsEventManager = buttonsEventManager;
|
|
12
|
+
RainMan.globals.disableSpeedPopup = this.handleSpeedPopupInvocation.bind(this);
|
|
12
13
|
}
|
|
13
14
|
handleInvokingSpeedPopup() {
|
|
14
15
|
if (!this.quickStopCounterLock &&
|
|
@@ -29,6 +30,9 @@ export class QuickStopController {
|
|
|
29
30
|
}
|
|
30
31
|
this.quickStopCounterLock = false;
|
|
31
32
|
}
|
|
33
|
+
setSpeedPopupDisabled(value) {
|
|
34
|
+
this.speedPopupDisabled = value;
|
|
35
|
+
}
|
|
32
36
|
handleResetCounter(shouldReset) {
|
|
33
37
|
if (shouldReset)
|
|
34
38
|
this.quickStopsCounter = 0;
|
|
@@ -4,7 +4,7 @@ import { RainMan } from "../Rainman";
|
|
|
4
4
|
import { ceilToDecimal } from "../utils";
|
|
5
5
|
export class UiController {
|
|
6
6
|
config;
|
|
7
|
-
lastBet = 0;
|
|
7
|
+
lastBet = RainMan.settingsStore.bet ?? 0;
|
|
8
8
|
_messageBox;
|
|
9
9
|
_totalNumberOfFreeSpins = 0;
|
|
10
10
|
_totalFreeSpinWinAmount = 0;
|
|
@@ -71,7 +71,7 @@ export class UiController {
|
|
|
71
71
|
beforeUpdateBet(_lastBet) { }
|
|
72
72
|
afterUpdateBet(_bet) { }
|
|
73
73
|
updateBet(strategy) {
|
|
74
|
-
if (RainMan.settingsStore.isFreeSpinsPlayEnabled
|
|
74
|
+
if (RainMan.settingsStore.isFreeSpinsPlayEnabled)
|
|
75
75
|
return;
|
|
76
76
|
const bet = this.getNewBet(strategy);
|
|
77
77
|
this.beforeUpdateBet(this.lastBet);
|
package/package.json
CHANGED