pixi-rainman-game-engine 0.1.36 → 0.1.38
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/README.md +4 -0
- package/dist/Rainman/types.d.ts +3 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +1 -0
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +1 -0
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +40 -4
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +40 -4
- package/dist/components/buttons/buttonGroups/LeftButtons.d.ts +2 -1
- package/dist/components/buttons/buttonGroups/LeftButtons.js +2 -1
- package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.d.ts +3 -0
- package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.js +3 -0
- package/dist/components/buttons/buttonGroups/LeftButtonsMobile.d.ts +3 -0
- package/dist/components/buttons/buttonGroups/LeftButtonsMobile.js +3 -0
- package/dist/components/buttons/buttonGroups/MiddleButtons.d.ts +4 -0
- package/dist/components/buttons/buttonGroups/MiddleButtons.js +4 -0
- package/dist/components/buttons/buttonGroups/RightButtons.d.ts +8 -0
- package/dist/components/buttons/buttonGroups/RightButtons.js +8 -0
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.d.ts +3 -0
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.js +3 -0
- package/dist/components/buttons/buttonGroups/RightButtonsMobile.d.ts +3 -0
- package/dist/components/buttons/buttonGroups/RightButtonsMobile.js +3 -0
- package/dist/components/buttons/buttonGroups/constants.d.ts +4 -0
- package/dist/components/buttons/buttonGroups/constants.js +4 -0
- package/dist/components/buttons/default/AutoplayButton.d.ts +14 -0
- package/dist/components/buttons/default/AutoplayButton.js +14 -0
- package/dist/components/buttons/default/BlackButton.d.ts +9 -0
- package/dist/components/buttons/default/BlackButton.js +9 -0
- package/dist/components/buttons/default/CollectButton.d.ts +10 -0
- package/dist/components/buttons/default/CollectButton.js +10 -0
- package/dist/components/buttons/default/InfoButton.d.ts +11 -0
- package/dist/components/buttons/default/InfoButton.js +11 -0
- package/dist/components/buttons/default/MoreButton.d.ts +11 -0
- package/dist/components/buttons/default/MoreButton.js +11 -0
- package/dist/components/buttons/default/NegButton.d.ts +9 -0
- package/dist/components/buttons/default/NegButton.js +9 -0
- package/dist/components/buttons/default/PlusButton.d.ts +11 -0
- package/dist/components/buttons/default/PlusButton.js +11 -0
- package/dist/components/buttons/default/RedButton.d.ts +9 -0
- package/dist/components/buttons/default/RedButton.js +9 -0
- package/dist/components/buttons/default/RefreshButton.d.ts +17 -0
- package/dist/components/buttons/default/RefreshButton.js +17 -0
- package/dist/components/buttons/default/SpeedControlButton.d.ts +12 -0
- package/dist/components/buttons/default/SpeedControlButton.js +12 -0
- package/dist/components/buttons/default/SpinConfirmationButton.d.ts +7 -0
- package/dist/components/buttons/default/SpinConfirmationButton.js +7 -0
- package/dist/components/buttons/default/VolumeButton.d.ts +15 -0
- package/dist/components/buttons/default/VolumeButton.js +15 -0
- package/dist/components/buttons/registrynames.d.ts +11 -0
- package/dist/components/buttons/registrynames.js +11 -0
- package/dist/components/common/Background.d.ts +2 -0
- package/dist/components/common/Background.js +2 -0
- package/dist/components/common/ResumableContainers.d.ts +27 -0
- package/dist/components/common/ResumableContainers.js +27 -0
- package/dist/components/symbols/AbstractSymbolBase.d.ts +0 -1
- package/dist/components/symbols/AbstractSymbolBase.js +0 -1
- package/dist/components/symbols/types.d.ts +14 -5
- package/dist/components/symbols/types.js +11 -2
- package/dist/constants/gamble.d.ts +7 -0
- package/dist/constants/gamble.js +7 -0
- package/dist/constants/paytableTypes.d.ts +3 -0
- package/dist/constants/paytableTypes.js +3 -0
- package/dist/controllers/AbstractController.d.ts +1 -1
- package/dist/localStorage/localStorage.d.ts +1 -1
- package/dist/localStorage/localStorage.js +1 -1
- package/dist/utils/assets/assetGetter.d.ts +1 -1
- package/dist/utils/assets/assetGetter.js +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -117,3 +117,7 @@ In the `scripts` directory, you have three scripts:
|
|
|
117
117
|
Code for the game engine contains in the `src` directory. For creating a feature you should add new directory into `src` directory. For example: `freeSpins` and in this folder contains all the mechanics.
|
|
118
118
|
|
|
119
119
|
In utils directory there all the utility functions and types.
|
|
120
|
+
|
|
121
|
+
### Creating a documentation in TypeDoc
|
|
122
|
+
|
|
123
|
+
Available tags to use you can check here: https://typedoc.org/guides/tags/
|
package/dist/Rainman/types.d.ts
CHANGED
|
@@ -60,6 +60,9 @@ export type OptionalAppConfig = {
|
|
|
60
60
|
};
|
|
61
61
|
};
|
|
62
62
|
export type AppConfig = RequiredAppConfig & DeepPartial<OptionalAppConfig>;
|
|
63
|
+
/**
|
|
64
|
+
* This interface represents global variables in pixi application. Can be extended in `engine.d.ts` in each project to provide project-wide variables.
|
|
65
|
+
*/
|
|
63
66
|
export interface Globals {
|
|
64
67
|
currency: Currency;
|
|
65
68
|
disableSpeedPopup?: (value: boolean) => void;
|
|
@@ -5,6 +5,7 @@ import { AutoplayButton, Background, BUTTONS, COMPONENTS, FreeSpinButton, Messag
|
|
|
5
5
|
import { RainMan } from "../../Rainman";
|
|
6
6
|
import { allUiItems, hideLayerIfPresent, UI_ITEMS } from "../../utils";
|
|
7
7
|
import { SPEED_LEVELS } from "../SpeedState";
|
|
8
|
+
/** @ignore */
|
|
8
9
|
export const SPEED_PREFIX = "speed-";
|
|
9
10
|
/**
|
|
10
11
|
* Class for managing buttons in games
|
|
@@ -11,8 +11,22 @@ import { IResizableContainer } from "../common/IResizableContainer";
|
|
|
11
11
|
import { AbstractFrame } from "../frame";
|
|
12
12
|
import { MessageBox } from "../messageBox";
|
|
13
13
|
/**
|
|
14
|
-
* AbstractMainContainer is a class for
|
|
14
|
+
* AbstractMainContainer is a class for placing every components in game.
|
|
15
|
+
* - {@link bottomPanel} - that's the bottom panel of the game, which contains buttons for changing game settings.
|
|
16
|
+
* In each game, there's two files for this panel - `bottomPanel.png` and `bottomPanelTexture.png`
|
|
17
|
+
* - {@link frame} - is a frame that can contain additional interface elements (such as Jackpot values) there is a `frame.json`
|
|
18
|
+
* animation in each game that has an animation that should be named `frame`.
|
|
19
|
+
* - {@link _freeSpinPlate} {@link _freeSpinSummary} - modals responsible for showing information about free games (with the information how many
|
|
20
|
+
* free spins you have won) and how much you have won during free games.
|
|
21
|
+
* - {@link messageBox} - message box that shows information about current win, auto spins left, free spins left, incentive message, win line indicator
|
|
22
|
+
* - {@link leftButtons} {@link rightButtons} - buttons
|
|
23
|
+
* - {@link logo} - logo
|
|
24
|
+
* - {@link background} - static background
|
|
25
|
+
* - {@link animatedFront} - animated front, need to be initialized in {@link triggerStoreInitState}
|
|
26
|
+
* - {@link overlay} - overlay, used when modal is shown
|
|
27
|
+
* - {@link gambleGame} - gamble game
|
|
15
28
|
*
|
|
29
|
+
* @abstract
|
|
16
30
|
* @class AbstractMainContainer
|
|
17
31
|
* @exports
|
|
18
32
|
*/
|
|
@@ -54,17 +68,22 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
54
68
|
protected triggerStoreInitState(...containersWithSpines: typeof RainMan.settingsStore.containersWithSpines): void;
|
|
55
69
|
get freeSpinPlate(): Nullable<AbstractFreeSpinContainer>;
|
|
56
70
|
get freeSpinSummary(): Nullable<AbstractFreeSpinContainer>;
|
|
71
|
+
/**
|
|
72
|
+
* Function for creating free spin container
|
|
73
|
+
*
|
|
74
|
+
* @returns {AbstractFreeSpinContainer | null} The container for the free spin plate, or null.
|
|
75
|
+
*/
|
|
57
76
|
protected createFreeSpinPlate(_resolver: () => void, _freeSpinCount: number, _isAdditionalFreeSpin: boolean): AbstractFreeSpinContainer | null;
|
|
58
77
|
/**
|
|
59
78
|
* Function for creating bonus win container
|
|
60
79
|
*
|
|
61
|
-
* @returns {Nullable<UpdatableSpineContainer>}
|
|
80
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the bonus win animation, or null.
|
|
62
81
|
*/
|
|
63
82
|
protected createBonusWinContainer(): Nullable<UpdatableSpineContainer>;
|
|
64
83
|
/**
|
|
65
|
-
*
|
|
84
|
+
* Creates a container for the super bonus win animation.
|
|
66
85
|
*
|
|
67
|
-
* @returns {
|
|
86
|
+
* @returns {UpdatableSpineContainer | null} The container for the super bonus win animation, or null.
|
|
68
87
|
*/
|
|
69
88
|
protected createSuperBonusWinContainer(): Nullable<UpdatableSpineContainer>;
|
|
70
89
|
/**
|
|
@@ -82,6 +101,11 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
82
101
|
* @param {boolean} isAdditionalFreeSpin - flag for displaying additional free spins
|
|
83
102
|
*/
|
|
84
103
|
invokeFreeSpinPlate(freeSpinCount: number, isAdditionalFreeSpin?: boolean): Promise<void>;
|
|
104
|
+
/**
|
|
105
|
+
* Function for creating free spin summary
|
|
106
|
+
*
|
|
107
|
+
* @returns {AbstractFreeSpinContainer | null} The container for the free spin summary, or null
|
|
108
|
+
*/
|
|
85
109
|
protected createFreeSpinSummary(_resolver: () => void, _freeSpinCount: number, _winAmount: number): AbstractFreeSpinContainer | null;
|
|
86
110
|
/**
|
|
87
111
|
* Function for invoking free spin summary
|
|
@@ -98,8 +122,20 @@ export declare abstract class AbstractMainContainer extends Container {
|
|
|
98
122
|
get bonusWinVisibleFor(): number;
|
|
99
123
|
get superBonusWinVisibleFor(): number;
|
|
100
124
|
protected abstract createBigWinContainer(): UpdatableSpineContainer;
|
|
125
|
+
/**
|
|
126
|
+
* Function for invoking big win animation, using `this.createBigWinContainer()` abstract function.
|
|
127
|
+
*
|
|
128
|
+
*/
|
|
101
129
|
invokeBigWin(): void;
|
|
130
|
+
/**
|
|
131
|
+
* Function for invoking big win animation, using `this.createSuperBonusWinContainer()` abstract function.
|
|
132
|
+
*
|
|
133
|
+
*/
|
|
102
134
|
invokeSuperBonusWin(): void;
|
|
135
|
+
/**
|
|
136
|
+
* Function for invoking big win animation, using `this.createBonusWinContainer()` abstract function.
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
103
139
|
invokeBonusWin(): void;
|
|
104
140
|
invokeMysteryWin(): void;
|
|
105
141
|
destroyBigWin(): void;
|
|
@@ -8,8 +8,22 @@ import { BUTTONS, LeftButtons, LeftButtonsLandscape, LeftButtonsMobile, MiddleBu
|
|
|
8
8
|
import { GambleGame } from "../GambleGame";
|
|
9
9
|
import { MessageBox } from "../messageBox";
|
|
10
10
|
/**
|
|
11
|
-
* AbstractMainContainer is a class for
|
|
11
|
+
* AbstractMainContainer is a class for placing every components in game.
|
|
12
|
+
* - {@link bottomPanel} - that's the bottom panel of the game, which contains buttons for changing game settings.
|
|
13
|
+
* In each game, there's two files for this panel - `bottomPanel.png` and `bottomPanelTexture.png`
|
|
14
|
+
* - {@link frame} - is a frame that can contain additional interface elements (such as Jackpot values) there is a `frame.json`
|
|
15
|
+
* animation in each game that has an animation that should be named `frame`.
|
|
16
|
+
* - {@link _freeSpinPlate} {@link _freeSpinSummary} - modals responsible for showing information about free games (with the information how many
|
|
17
|
+
* free spins you have won) and how much you have won during free games.
|
|
18
|
+
* - {@link messageBox} - message box that shows information about current win, auto spins left, free spins left, incentive message, win line indicator
|
|
19
|
+
* - {@link leftButtons} {@link rightButtons} - buttons
|
|
20
|
+
* - {@link logo} - logo
|
|
21
|
+
* - {@link background} - static background
|
|
22
|
+
* - {@link animatedFront} - animated front, need to be initialized in {@link triggerStoreInitState}
|
|
23
|
+
* - {@link overlay} - overlay, used when modal is shown
|
|
24
|
+
* - {@link gambleGame} - gamble game
|
|
12
25
|
*
|
|
26
|
+
* @abstract
|
|
13
27
|
* @class AbstractMainContainer
|
|
14
28
|
* @exports
|
|
15
29
|
*/
|
|
@@ -62,21 +76,26 @@ export class AbstractMainContainer extends Container {
|
|
|
62
76
|
get freeSpinSummary() {
|
|
63
77
|
return this._freeSpinSummary;
|
|
64
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Function for creating free spin container
|
|
81
|
+
*
|
|
82
|
+
* @returns {AbstractFreeSpinContainer | null} The container for the free spin plate, or null.
|
|
83
|
+
*/
|
|
65
84
|
createFreeSpinPlate(_resolver, _freeSpinCount, _isAdditionalFreeSpin) {
|
|
66
85
|
return null;
|
|
67
86
|
}
|
|
68
87
|
/**
|
|
69
88
|
* Function for creating bonus win container
|
|
70
89
|
*
|
|
71
|
-
* @returns {Nullable<UpdatableSpineContainer>}
|
|
90
|
+
* @returns {Nullable<UpdatableSpineContainer>} The container for the bonus win animation, or null.
|
|
72
91
|
*/
|
|
73
92
|
createBonusWinContainer() {
|
|
74
93
|
return null;
|
|
75
94
|
}
|
|
76
95
|
/**
|
|
77
|
-
*
|
|
96
|
+
* Creates a container for the super bonus win animation.
|
|
78
97
|
*
|
|
79
|
-
* @returns {
|
|
98
|
+
* @returns {UpdatableSpineContainer | null} The container for the super bonus win animation, or null.
|
|
80
99
|
*/
|
|
81
100
|
createSuperBonusWinContainer() {
|
|
82
101
|
return null;
|
|
@@ -116,6 +135,11 @@ export class AbstractMainContainer extends Container {
|
|
|
116
135
|
this.hideOverlay();
|
|
117
136
|
refreshButton.flipDisabledFlag(false);
|
|
118
137
|
}
|
|
138
|
+
/**
|
|
139
|
+
* Function for creating free spin summary
|
|
140
|
+
*
|
|
141
|
+
* @returns {AbstractFreeSpinContainer | null} The container for the free spin summary, or null
|
|
142
|
+
*/
|
|
119
143
|
createFreeSpinSummary(_resolver, _freeSpinCount, _winAmount) {
|
|
120
144
|
return null;
|
|
121
145
|
}
|
|
@@ -178,6 +202,10 @@ export class AbstractMainContainer extends Container {
|
|
|
178
202
|
get superBonusWinVisibleFor() {
|
|
179
203
|
return this._superBonusWinInvokedAt == null ? 0 : performance.now() - this._superBonusWinInvokedAt;
|
|
180
204
|
}
|
|
205
|
+
/**
|
|
206
|
+
* Function for invoking big win animation, using `this.createBigWinContainer()` abstract function.
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
181
209
|
invokeBigWin() {
|
|
182
210
|
if (this.bigWinContainer !== null) {
|
|
183
211
|
throw new Error("😡 Big Win is already declared");
|
|
@@ -192,6 +220,10 @@ export class AbstractMainContainer extends Container {
|
|
|
192
220
|
SoundManager.play(SoundTracks.bigWin);
|
|
193
221
|
this._bigWinInvokedAt = performance.now();
|
|
194
222
|
}
|
|
223
|
+
/**
|
|
224
|
+
* Function for invoking big win animation, using `this.createSuperBonusWinContainer()` abstract function.
|
|
225
|
+
*
|
|
226
|
+
*/
|
|
195
227
|
invokeSuperBonusWin() {
|
|
196
228
|
if (this.superBonusWinContainer !== null) {
|
|
197
229
|
throw new Error("😡 Super Bonus Win is already declared");
|
|
@@ -207,6 +239,10 @@ export class AbstractMainContainer extends Container {
|
|
|
207
239
|
this.addChild(this.superBonusWinContainer);
|
|
208
240
|
this._superBonusWinInvokedAt = performance.now();
|
|
209
241
|
}
|
|
242
|
+
/**
|
|
243
|
+
* Function for invoking big win animation, using `this.createBonusWinContainer()` abstract function.
|
|
244
|
+
*
|
|
245
|
+
*/
|
|
210
246
|
invokeBonusWin() {
|
|
211
247
|
if (this.bonusWinContainer !== null) {
|
|
212
248
|
throw new Error("😡 Bonus Win is already declared");
|
|
@@ -3,13 +3,14 @@ import { UpdatableTextComponent } from "../../updatable";
|
|
|
3
3
|
import { InfoButton, MoreButton, VolumeButton } from "../default";
|
|
4
4
|
/**
|
|
5
5
|
* Class for managing left buttons in game
|
|
6
|
-
* The class uses VolumeButton, MoreButton, InfoButton, UpdatableTextComponent
|
|
6
|
+
* The class uses {@link VolumeButton}, {@link MoreButton}, {@link InfoButton}, {@link UpdatableTextComponent}
|
|
7
7
|
* to create left buttons
|
|
8
8
|
* This container have bet and credit texts
|
|
9
9
|
*
|
|
10
10
|
* @class
|
|
11
11
|
* @extends {ResponsiveContainer}
|
|
12
12
|
* @export
|
|
13
|
+
* @document LeftButtons.md
|
|
13
14
|
*/
|
|
14
15
|
export declare class LeftButtons extends ResponsiveContainer {
|
|
15
16
|
protected readonly volumeButton: VolumeButton;
|
|
@@ -7,13 +7,14 @@ import { InfoButton, MoreButton, VolumeButton } from "../default";
|
|
|
7
7
|
import { COMPONENTS, REGISTRY } from "../registrynames";
|
|
8
8
|
/**
|
|
9
9
|
* Class for managing left buttons in game
|
|
10
|
-
* The class uses VolumeButton, MoreButton, InfoButton, UpdatableTextComponent
|
|
10
|
+
* The class uses {@link VolumeButton}, {@link MoreButton}, {@link InfoButton}, {@link UpdatableTextComponent}
|
|
11
11
|
* to create left buttons
|
|
12
12
|
* This container have bet and credit texts
|
|
13
13
|
*
|
|
14
14
|
* @class
|
|
15
15
|
* @extends {ResponsiveContainer}
|
|
16
16
|
* @export
|
|
17
|
+
* @document LeftButtons.md
|
|
17
18
|
*/
|
|
18
19
|
export class LeftButtons extends ResponsiveContainer {
|
|
19
20
|
volumeButton = new VolumeButton();
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ResponsiveContainer } from "../../common";
|
|
2
2
|
import { UpdatableTextComponent } from "../../updatable";
|
|
3
|
+
/**
|
|
4
|
+
* Buttons for mobile version. It's similar to PC, it has a bet value and total credit text, both created by {@link UpdatableTextComponent}.
|
|
5
|
+
*/
|
|
3
6
|
export declare class LeftButtonsLandscape extends ResponsiveContainer {
|
|
4
7
|
protected readonly credit: UpdatableTextComponent;
|
|
5
8
|
protected readonly bet: UpdatableTextComponent;
|
|
@@ -4,6 +4,9 @@ import { RainMan } from "../../../Rainman";
|
|
|
4
4
|
import { ResponsiveContainer } from "../../common";
|
|
5
5
|
import { UPDATABLE_MODES, UpdatableTextComponent } from "../../updatable";
|
|
6
6
|
import { COMPONENTS, REGISTRY } from "../registrynames";
|
|
7
|
+
/**
|
|
8
|
+
* Buttons for mobile version. It's similar to PC, it has a bet value and total credit text, both created by {@link UpdatableTextComponent}.
|
|
9
|
+
*/
|
|
7
10
|
export class LeftButtonsLandscape extends ResponsiveContainer {
|
|
8
11
|
credit = new UpdatableTextComponent(COMPONENTS.creditText, i18next.t("credit"), UPDATABLE_MODES.money, RainMan.config.mobileFontSize);
|
|
9
12
|
bet = new UpdatableTextComponent(COMPONENTS.betText, i18next.t("bet"), UPDATABLE_MODES.money, RainMan.config.mobileFontSize);
|
|
@@ -2,6 +2,9 @@ import { ITextStyle } from "pixi.js";
|
|
|
2
2
|
import { ResponsiveContainer } from "../../common";
|
|
3
3
|
import { UpdatableTextComponent } from "../../updatable";
|
|
4
4
|
import { MoreButton, VolumeButton } from "../default";
|
|
5
|
+
/**
|
|
6
|
+
* Buttons for mobile version. It has a settings button and total credit text {@link UpdatableTextComponent}.
|
|
7
|
+
*/
|
|
5
8
|
export declare class LeftButtonsMobile extends ResponsiveContainer {
|
|
6
9
|
protected readonly credit: UpdatableTextComponent;
|
|
7
10
|
protected readonly moreButton: MoreButton;
|
|
@@ -6,6 +6,9 @@ import { UPDATABLE_MODES, UpdatableTextComponent } from "../../updatable";
|
|
|
6
6
|
import { MoreButton, VolumeButton } from "../default";
|
|
7
7
|
import { COMPONENTS, REGISTRY } from "../registrynames";
|
|
8
8
|
import { MOBILE_BUTTONS_GAP, MOBILE_PANEL_BUTTON_SCALE, MOBILE_X_OFFSET, MOBILE_Y_BOTTOM_OFFSET } from "./constants";
|
|
9
|
+
/**
|
|
10
|
+
* Buttons for mobile version. It has a settings button and total credit text {@link UpdatableTextComponent}.
|
|
11
|
+
*/
|
|
9
12
|
export class LeftButtonsMobile extends ResponsiveContainer {
|
|
10
13
|
credit = new UpdatableTextComponent(COMPONENTS.creditText, i18next.t("credit"), UPDATABLE_MODES.money, RainMan.config.mobileFontSize);
|
|
11
14
|
moreButton = new MoreButton(true);
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { Graphics } from "pixi.js";
|
|
2
2
|
import { ResponsiveContainer } from "../../common";
|
|
3
3
|
import { AutoplayButton, PlusButton, RefreshButton } from "../default";
|
|
4
|
+
/**
|
|
5
|
+
* Class for managing middle buttons in game (MOBILE ONLY). The class uses {@link AutoplayButton}, {@link PlusButton}, {@link RefreshButton}
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
4
8
|
export declare class MiddleButtons extends ResponsiveContainer {
|
|
5
9
|
private landscape;
|
|
6
10
|
protected readonly autoplayButton: AutoplayButton;
|
|
@@ -4,6 +4,10 @@ import { RainMan } from "../../../Rainman";
|
|
|
4
4
|
import { ResponsiveContainer } from "../../common";
|
|
5
5
|
import { AutoplayButton, PlusButton, RefreshButton } from "../default";
|
|
6
6
|
import { REGISTRY } from "../registrynames";
|
|
7
|
+
/**
|
|
8
|
+
* Class for managing middle buttons in game (MOBILE ONLY). The class uses {@link AutoplayButton}, {@link PlusButton}, {@link RefreshButton}
|
|
9
|
+
*
|
|
10
|
+
*/
|
|
7
11
|
export class MiddleButtons extends ResponsiveContainer {
|
|
8
12
|
landscape;
|
|
9
13
|
autoplayButton = new AutoplayButton(true);
|
|
@@ -2,6 +2,14 @@ import { Nullable } from "../../../utils";
|
|
|
2
2
|
import { ResponsiveContainer } from "../../common";
|
|
3
3
|
import { BaseButton } from "../BaseButton";
|
|
4
4
|
import { AutoplayButton, NegButton, PlusButton, RefreshButton, SpeedControlButton } from "../default";
|
|
5
|
+
/**
|
|
6
|
+
* Class for managing right buttons in game. The class uses {@link AutoplayButton}, {@link NegButton}, {@link PlusButton},
|
|
7
|
+
* {@link RefreshButton}, {@link SpeedControlButton} and {@link gambleButton} if exists.
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
* @extends {ResponsiveContainer}
|
|
11
|
+
* @document RightButtons.md
|
|
12
|
+
*/
|
|
5
13
|
export declare class RightButtons extends ResponsiveContainer {
|
|
6
14
|
protected readonly autoplayButton: AutoplayButton;
|
|
7
15
|
protected readonly negButton: NegButton;
|
|
@@ -3,6 +3,14 @@ import { RainMan } from "../../../Rainman";
|
|
|
3
3
|
import { ResponsiveContainer } from "../../common";
|
|
4
4
|
import { AutoplayButton, NegButton, PlusButton, RefreshButton, SpeedControlButton } from "../default";
|
|
5
5
|
import { REGISTRY } from "../registrynames";
|
|
6
|
+
/**
|
|
7
|
+
* Class for managing right buttons in game. The class uses {@link AutoplayButton}, {@link NegButton}, {@link PlusButton},
|
|
8
|
+
* {@link RefreshButton}, {@link SpeedControlButton} and {@link gambleButton} if exists.
|
|
9
|
+
*
|
|
10
|
+
* @class
|
|
11
|
+
* @extends {ResponsiveContainer}
|
|
12
|
+
* @document RightButtons.md
|
|
13
|
+
*/
|
|
6
14
|
export class RightButtons extends ResponsiveContainer {
|
|
7
15
|
autoplayButton = new AutoplayButton();
|
|
8
16
|
negButton = new NegButton();
|
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { ResponsiveContainer } from "../../common";
|
|
2
2
|
import { InfoButton, MoreButton, NegButton, SpeedControlButton, VolumeButton } from "../default";
|
|
3
|
+
/**
|
|
4
|
+
* Buttons for mobile version- landscape. It has a settings button and game information button.
|
|
5
|
+
*/
|
|
3
6
|
export declare class RightButtonsLandscape extends ResponsiveContainer {
|
|
4
7
|
protected readonly moreButton: MoreButton;
|
|
5
8
|
protected readonly volumeButton: VolumeButton;
|
|
@@ -4,6 +4,9 @@ import { ResponsiveContainer } from "../../common";
|
|
|
4
4
|
import { InfoButton, MoreButton, NegButton, SpeedControlButton, VolumeButton } from "../default";
|
|
5
5
|
import { REGISTRY } from "../registrynames";
|
|
6
6
|
import { MOBILE_BUTTONS_GAP, MOBILE_PANEL_BUTTON_SCALE, MOBILE_X_OFFSET, MOBILE_Y_BOTTOM_OFFSET } from "./constants";
|
|
7
|
+
/**
|
|
8
|
+
* Buttons for mobile version- landscape. It has a settings button and game information button.
|
|
9
|
+
*/
|
|
7
10
|
export class RightButtonsLandscape extends ResponsiveContainer {
|
|
8
11
|
moreButton = new MoreButton(true);
|
|
9
12
|
volumeButton = new VolumeButton();
|
|
@@ -2,6 +2,9 @@ import { ITextStyle } from "pixi.js";
|
|
|
2
2
|
import { ResponsiveContainer } from "../../common";
|
|
3
3
|
import { UpdatableTextComponent } from "../../updatable";
|
|
4
4
|
import { InfoButton, NegButton, SpeedControlButton } from "../default";
|
|
5
|
+
/**
|
|
6
|
+
* Buttons for mobile version. It has a current bet and game information button.
|
|
7
|
+
*/
|
|
5
8
|
export declare class RightButtonsMobile extends ResponsiveContainer {
|
|
6
9
|
protected readonly infoButton: InfoButton;
|
|
7
10
|
protected readonly negButton: NegButton;
|
|
@@ -6,6 +6,9 @@ import { UPDATABLE_MODES, UpdatableTextComponent } from "../../updatable";
|
|
|
6
6
|
import { InfoButton, NegButton, SpeedControlButton } from "../default";
|
|
7
7
|
import { COMPONENTS, REGISTRY } from "../registrynames";
|
|
8
8
|
import { MOBILE_BUTTONS_GAP, MOBILE_PANEL_BUTTON_SCALE, MOBILE_X_OFFSET, MOBILE_Y_BOTTOM_OFFSET } from "./constants";
|
|
9
|
+
/**
|
|
10
|
+
* Buttons for mobile version. It has a current bet and game information button.
|
|
11
|
+
*/
|
|
9
12
|
export class RightButtonsMobile extends ResponsiveContainer {
|
|
10
13
|
infoButton = new InfoButton(true);
|
|
11
14
|
negButton = new NegButton();
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
+
/** @ignore */
|
|
1
2
|
export declare const MOBILE_Y_BOTTOM_OFFSET = 70;
|
|
3
|
+
/** @ignore */
|
|
2
4
|
export declare const MOBILE_X_OFFSET = 20;
|
|
5
|
+
/** @ignore */
|
|
3
6
|
export declare const MOBILE_PANEL_BUTTON_SCALE = 0.8;
|
|
7
|
+
/** @ignore */
|
|
4
8
|
export declare const MOBILE_BUTTONS_GAP = 30;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for handling autoplay
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `normal/autoplay.png`
|
|
6
|
+
* - hover - `hover/autoplay.png`
|
|
7
|
+
* - clicked - `clicked/autoplay.png`
|
|
8
|
+
* - mobile - `mobile/autoplay.png`
|
|
9
|
+
* - mobile/clicked - `mobile/clicked/autoplay.png`
|
|
10
|
+
* - mobile/autoplay-on - `mobile/autoplay-on.png`
|
|
11
|
+
* - mobile/clicked/autoplay-on - `mobile/clicked/autoplay-on.png`
|
|
12
|
+
*
|
|
13
|
+
* @class
|
|
14
|
+
* @extends {BaseButton}
|
|
15
|
+
*/
|
|
2
16
|
export declare class AutoplayButton extends BaseButton {
|
|
3
17
|
private mobile;
|
|
4
18
|
static readonly registryName = "autoplayButton";
|
|
@@ -3,6 +3,20 @@ import { SoundTracks } from "../../../application";
|
|
|
3
3
|
import { RainMan } from "../../../Rainman";
|
|
4
4
|
import { getTexture, getTextureSafely } from "../../../utils";
|
|
5
5
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
6
|
+
/**
|
|
7
|
+
* Button for handling autoplay
|
|
8
|
+
* It needs following textures:
|
|
9
|
+
* - normal - `normal/autoplay.png`
|
|
10
|
+
* - hover - `hover/autoplay.png`
|
|
11
|
+
* - clicked - `clicked/autoplay.png`
|
|
12
|
+
* - mobile - `mobile/autoplay.png`
|
|
13
|
+
* - mobile/clicked - `mobile/clicked/autoplay.png`
|
|
14
|
+
* - mobile/autoplay-on - `mobile/autoplay-on.png`
|
|
15
|
+
* - mobile/clicked/autoplay-on - `mobile/clicked/autoplay-on.png`
|
|
16
|
+
*
|
|
17
|
+
* @class
|
|
18
|
+
* @extends {BaseButton}
|
|
19
|
+
*/
|
|
6
20
|
export class AutoplayButton extends BaseButton {
|
|
7
21
|
mobile;
|
|
8
22
|
static registryName = "autoplayButton";
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for handling black figure in Gamble Mechanic
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `black-n.png`
|
|
6
|
+
* - hover - `black-h.png`
|
|
7
|
+
* - clicked - `black-c.png`
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
2
11
|
export declare class BlackButton extends BaseButton {
|
|
3
12
|
static readonly registryName = "gambleCollectButton";
|
|
4
13
|
constructor();
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { Texture } from "pixi.js";
|
|
2
2
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
3
|
+
/**
|
|
4
|
+
* Button for handling black figure in Gamble Mechanic
|
|
5
|
+
* It needs following textures:
|
|
6
|
+
* - normal - `black-n.png`
|
|
7
|
+
* - hover - `black-h.png`
|
|
8
|
+
* - clicked - `black-c.png`
|
|
9
|
+
*
|
|
10
|
+
* @class
|
|
11
|
+
*/
|
|
3
12
|
export class BlackButton extends BaseButton {
|
|
4
13
|
static registryName = "gambleCollectButton";
|
|
5
14
|
constructor() {
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for collecting win in Gamble Mechanic
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `collect-button-n.png`
|
|
6
|
+
* - hover - `collect-button-h.png`
|
|
7
|
+
* - clicked - `collect-button-c.png`
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* @class
|
|
11
|
+
*/
|
|
2
12
|
export declare class CollectButton extends BaseButton {
|
|
3
13
|
static readonly registryName = "gambleCollectButton";
|
|
4
14
|
constructor();
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import { Texture } from "pixi.js";
|
|
2
2
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
3
|
+
/**
|
|
4
|
+
* Button for collecting win in Gamble Mechanic
|
|
5
|
+
* It needs following textures:
|
|
6
|
+
* - normal - `collect-button-n.png`
|
|
7
|
+
* - hover - `collect-button-h.png`
|
|
8
|
+
* - clicked - `collect-button-c.png`
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
3
13
|
export class CollectButton extends BaseButton {
|
|
4
14
|
static registryName = "gambleCollectButton";
|
|
5
15
|
constructor() {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for displaying game info.
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `normal/info.png`
|
|
6
|
+
* - hover - `hover/info.png`
|
|
7
|
+
* - clicked - `clicked/info.png`
|
|
8
|
+
* - mobile - `mobile/info.png`
|
|
9
|
+
* - mobile/clicked - `mobile/clicked/info.png`
|
|
10
|
+
*
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
2
13
|
export declare class InfoButton extends BaseButton {
|
|
3
14
|
static readonly registryName = "infoButton";
|
|
4
15
|
constructor(mobile?: boolean);
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { getTexture } from "../../../utils";
|
|
2
2
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
3
|
+
/**
|
|
4
|
+
* Button for displaying game info.
|
|
5
|
+
* It needs following textures:
|
|
6
|
+
* - normal - `normal/info.png`
|
|
7
|
+
* - hover - `hover/info.png`
|
|
8
|
+
* - clicked - `clicked/info.png`
|
|
9
|
+
* - mobile - `mobile/info.png`
|
|
10
|
+
* - mobile/clicked - `mobile/clicked/info.png`
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
*/
|
|
3
14
|
export class InfoButton extends BaseButton {
|
|
4
15
|
static registryName = "infoButton";
|
|
5
16
|
constructor(mobile = false) {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for displaying game settings.
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `normal/menu.png`
|
|
6
|
+
* - hover - `hover/menu.png`
|
|
7
|
+
* - clicked - `clicked/menu.png`
|
|
8
|
+
* - mobile - `mobile/menu.png`
|
|
9
|
+
* - mobile/clicked - `mobile/clicked/menu.png`
|
|
10
|
+
*
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
2
13
|
export declare class MoreButton extends BaseButton {
|
|
3
14
|
static readonly registryName = "moreButton";
|
|
4
15
|
constructor(mobile?: boolean);
|
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
import { getTexture } from "../../../utils";
|
|
2
2
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
3
|
+
/**
|
|
4
|
+
* Button for displaying game settings.
|
|
5
|
+
* It needs following textures:
|
|
6
|
+
* - normal - `normal/menu.png`
|
|
7
|
+
* - hover - `hover/menu.png`
|
|
8
|
+
* - clicked - `clicked/menu.png`
|
|
9
|
+
* - mobile - `mobile/menu.png`
|
|
10
|
+
* - mobile/clicked - `mobile/clicked/menu.png`
|
|
11
|
+
*
|
|
12
|
+
* @class
|
|
13
|
+
*/
|
|
3
14
|
export class MoreButton extends BaseButton {
|
|
4
15
|
static registryName = "moreButton";
|
|
5
16
|
constructor(mobile = false) {
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for decreasing bet value.
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `normal/minus.png`
|
|
6
|
+
* - hover - `hover/minus.png`
|
|
7
|
+
* - clicked - `clicked/minus.png`
|
|
8
|
+
*
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
2
11
|
export declare class NegButton extends BaseButton {
|
|
3
12
|
static readonly registryName = "negButton";
|
|
4
13
|
constructor();
|
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
import { SoundTracks } from "../../../application";
|
|
2
2
|
import { getTexture } from "../../../utils";
|
|
3
3
|
import { BaseButton, ButtonStates } from "../BaseButton";
|
|
4
|
+
/**
|
|
5
|
+
* Button for decreasing bet value.
|
|
6
|
+
* It needs following textures:
|
|
7
|
+
* - normal - `normal/minus.png`
|
|
8
|
+
* - hover - `hover/minus.png`
|
|
9
|
+
* - clicked - `clicked/minus.png`
|
|
10
|
+
*
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
4
13
|
export class NegButton extends BaseButton {
|
|
5
14
|
static registryName = "negButton";
|
|
6
15
|
constructor() {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { BaseButton } from "../BaseButton";
|
|
2
|
+
/**
|
|
3
|
+
* Button for increasing bet value.
|
|
4
|
+
* It needs following textures:
|
|
5
|
+
* - normal - `normal/plus.png`
|
|
6
|
+
* - hover - `hover/plus.png`
|
|
7
|
+
* - clicked - `clicked/plus.png`
|
|
8
|
+
* - mobile - `mobile/bet.png`
|
|
9
|
+
* - mobile/clicked - `mobile/clicked/bet.png`
|
|
10
|
+
*
|
|
11
|
+
* @class
|
|
12
|
+
*/
|
|
2
13
|
export declare class PlusButton extends BaseButton {
|
|
3
14
|
static readonly registryName = "plusButton";
|
|
4
15
|
constructor(mobile?: boolean);
|