pixi-rainman-game-engine 0.3.0 → 0.3.2
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.d.ts +23 -9
- package/dist/ComponentRegistry/ComponentRegistry.js +25 -10
- package/dist/ComponentRegistry/types.d.ts +3 -4
- package/dist/DescribedPlayableAction/DescribedPlayableAction.d.ts +2 -0
- package/dist/DescribedPlayableAction/DescribedPlayableAction.js +2 -0
- package/dist/Money/MoneyText.d.ts +5 -0
- package/dist/Money/MoneyText.js +5 -0
- package/dist/Rainman/appConfig.js +1 -0
- package/dist/Rainman/types.d.ts +1 -0
- package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.d.ts +4 -0
- package/dist/SettingsUI/hooks/useBuyFreeSpins/useBuyFreeSpins.js +4 -0
- package/dist/SettingsUI/hooks/useDeviceOrientations.d.ts +4 -0
- package/dist/SettingsUI/hooks/useDeviceOrientations.js +4 -0
- package/dist/application/ApiConfig/ApiConfig.d.ts +2 -1
- package/dist/application/ApiConfig/ApiConfig.js +3 -2
- package/dist/application/ApiConfig/SymbolId.d.ts +1 -1
- package/dist/application/ButtonsEventManager/ButtonsEventManager.d.ts +42 -5
- package/dist/application/ButtonsEventManager/ButtonsEventManager.js +51 -9
- package/dist/application/SoundManager/SoundManager.d.ts +26 -1
- package/dist/application/SoundManager/SoundManager.js +30 -2
- package/dist/application/SpeedState/SpeedAdapter.d.ts +9 -0
- package/dist/application/SpeedState/SpeedAdapter.js +9 -0
- package/dist/application/SpeedState/SpeedLevel.d.ts +42 -0
- package/dist/application/SpeedState/SpeedLevel.js +30 -0
- package/dist/application/SpeedState/SpeedLevelHandler.d.ts +7 -0
- package/dist/application/SpeedState/SpeedLevelHandler.js +7 -0
- package/dist/application/SpinLogic/SpinLogic.d.ts +58 -0
- package/dist/application/SpinLogic/SpinLogic.js +58 -0
- package/dist/application/SpinLogic/SpinLogicDTO.d.ts +70 -0
- package/dist/application/SpinLogic/SpinLogicDTO.js +70 -0
- package/dist/application/SpinLogic/WinScenarios.d.ts +12 -0
- package/dist/application/SpinLogic/WinScenarios.js +12 -0
- package/dist/application/SpinLogic/types.d.ts +10 -0
- package/dist/application/TimedActions/IncentiveComponent.d.ts +10 -0
- package/dist/application/TimedActions/IncentiveComponent.js +9 -1
- package/dist/application/TimedActions/TimedIncentiveController.d.ts +37 -0
- package/dist/application/TimedActions/TimedIncentiveController.js +37 -0
- package/dist/application/setup.d.ts +0 -1
- package/dist/application/setup.js +0 -1
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.d.ts +36 -1
- package/dist/components/AbstractFreeSpinContainer/AbstractFreeSpinContainer.js +25 -0
- package/dist/components/AbstractMainContainer/AbstractMainContainer.d.ts +83 -2
- package/dist/components/AbstractMainContainer/AbstractMainContainer.js +97 -11
- package/dist/components/DoubleBorderText/DoubleBorderText.d.ts +10 -0
- package/dist/components/DoubleBorderText/DoubleBorderText.js +24 -0
- package/dist/components/DoubleBorderText/index.d.ts +1 -0
- package/dist/components/DoubleBorderText/index.js +1 -0
- package/dist/components/GambleGame/GambleGame.d.ts +39 -0
- package/dist/components/GambleGame/GambleGame.js +44 -3
- package/dist/components/GambleGame/types.d.ts +5 -0
- package/dist/components/buttons/BaseButton/BaseButton.d.ts +73 -2
- package/dist/components/buttons/BaseButton/BaseButton.js +73 -2
- package/dist/components/buttons/BaseButton/types.d.ts +5 -0
- package/dist/components/buttons/buttonGroups/LeftButtons.d.ts +11 -0
- package/dist/components/buttons/buttonGroups/LeftButtons.js +11 -0
- package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.d.ts +13 -1
- package/dist/components/buttons/buttonGroups/LeftButtonsLandscape.js +13 -1
- package/dist/components/buttons/buttonGroups/LeftButtonsMobile.d.ts +19 -1
- package/dist/components/buttons/buttonGroups/LeftButtonsMobile.js +19 -1
- package/dist/components/buttons/buttonGroups/MiddleButtons.d.ts +27 -2
- package/dist/components/buttons/buttonGroups/MiddleButtons.js +46 -3
- package/dist/components/buttons/buttonGroups/RightButtons.d.ts +19 -3
- package/dist/components/buttons/buttonGroups/RightButtons.js +29 -1
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.d.ts +11 -0
- package/dist/components/buttons/buttonGroups/RightButtonsLandscape.js +11 -0
- package/dist/components/buttons/buttonGroups/RightButtonsMobile.d.ts +17 -0
- package/dist/components/buttons/buttonGroups/RightButtonsMobile.js +17 -0
- package/dist/components/buttons/default/AutoplayButton.d.ts +6 -0
- package/dist/components/buttons/default/AutoplayButton.js +8 -1
- package/dist/components/buttons/default/GambleButton.d.ts +13 -0
- package/dist/components/buttons/default/GambleButton.js +43 -0
- package/dist/components/buttons/default/RefreshButton.d.ts +30 -0
- package/dist/components/buttons/default/RefreshButton.js +36 -3
- package/dist/components/buttons/default/SpeedControlButton.d.ts +2 -0
- package/dist/components/buttons/default/SpeedControlButton.js +2 -0
- package/dist/components/buttons/default/TakeButton.d.ts +13 -0
- package/dist/components/buttons/default/TakeButton.js +37 -0
- package/dist/components/buttons/default/VolumeButton.d.ts +2 -0
- package/dist/components/buttons/default/VolumeButton.js +2 -0
- package/dist/components/buttons/default/index.d.ts +2 -0
- package/dist/components/buttons/default/index.js +2 -0
- package/dist/components/buttons/registrynames.d.ts +2 -0
- package/dist/components/buttons/registrynames.js +3 -1
- package/dist/components/common/AnimatedBackground.d.ts +22 -0
- package/dist/components/common/AnimatedBackground.js +22 -0
- package/dist/components/common/AnimatedNumber.d.ts +36 -0
- package/dist/components/common/AnimatedNumber.js +36 -0
- package/dist/components/common/Background.d.ts +20 -0
- package/dist/components/common/Background.js +22 -1
- package/dist/components/common/FreeSpinButton.d.ts +33 -1
- package/dist/components/common/FreeSpinButton.js +37 -4
- package/dist/components/common/IResizableContainer.d.ts +4 -0
- package/dist/components/common/Logo.d.ts +21 -0
- package/dist/components/common/Logo.js +21 -0
- package/dist/components/common/LogoStatic.d.ts +10 -0
- package/dist/components/common/LogoStatic.js +10 -0
- package/dist/components/common/ResponsiveComponent.d.ts +22 -0
- package/dist/components/common/ResponsiveComponent.js +10 -0
- package/dist/components/common/ResumableContainers.d.ts +6 -0
- package/dist/components/common/ResumableContainers.js +6 -0
- package/dist/components/common/ScalableSpine.d.ts +11 -0
- package/dist/components/common/ScalableSpine.js +11 -0
- package/dist/components/frame/AbstractColumnsContainer.d.ts +20 -6
- package/dist/components/frame/AbstractColumnsContainer.js +18 -4
- package/dist/components/frame/AbstractFrame.d.ts +115 -0
- package/dist/components/frame/AbstractFrame.js +97 -2
- package/dist/components/frame/AbstractInnerFrame.d.ts +5 -0
- package/dist/components/frame/AbstractInnerFrame.js +5 -0
- package/dist/components/frame/WinLineAnimation.d.ts +10 -0
- package/dist/components/frame/WinLineAnimation.js +12 -1
- package/dist/components/frame/constants.d.ts +7 -0
- package/dist/components/frame/constants.js +3 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/messageBox/MessageBox.d.ts +33 -0
- package/dist/components/messageBox/MessageBox.js +34 -1
- package/dist/components/symbols/AbstractSymbolBase.d.ts +146 -2
- package/dist/components/symbols/AbstractSymbolBase.js +137 -14
- package/dist/components/symbols/AbstractSymbolsColumn.d.ts +233 -3
- package/dist/components/symbols/AbstractSymbolsColumn.js +220 -10
- package/dist/components/symbols/DroppableSymbol.d.ts +16 -0
- package/dist/components/symbols/DroppableSymbol.js +16 -0
- package/dist/components/symbols/DroppableSymbolsColumn.d.ts +51 -0
- package/dist/components/symbols/DroppableSymbolsColumn.js +57 -3
- package/dist/components/symbols/types.d.ts +8 -0
- package/dist/components/symbols/types.js +4 -0
- package/dist/components/updatable/GambleUpdatableText.d.ts +5 -0
- package/dist/components/updatable/GambleUpdatableText.js +5 -0
- package/dist/components/updatable/StylefulUpdatableText.d.ts +23 -0
- package/dist/components/updatable/StylefulUpdatableText.js +25 -1
- package/dist/components/updatable/UpdatableValueComponent.d.ts +71 -0
- package/dist/components/updatable/UpdatableValueComponent.js +77 -4
- package/dist/connectivity/ConnectionWrapper.d.ts +20 -1
- package/dist/connectivity/ConnectionWrapper.js +23 -3
- package/dist/connectivity/LocalConnectionWrapper.d.ts +2 -2
- package/dist/connectivity/LocalConnectionWrapper.js +2 -2
- package/dist/connectivity/serverConnection.d.ts +59 -0
- package/dist/connectivity/serverData.d.ts +3 -1
- package/dist/connectivity/spinData.d.ts +15 -0
- package/dist/connectivity/spinData.js +15 -0
- package/dist/constants/gamePhase.d.ts +4 -0
- package/dist/controllers/AbstractController.d.ts +114 -5
- package/dist/controllers/AbstractController.js +180 -37
- package/dist/controllers/QuickStopController.d.ts +3 -0
- package/dist/controllers/QuickStopController.js +3 -0
- package/dist/controllers/UiController.d.ts +163 -1
- package/dist/controllers/UiController.js +170 -5
- package/dist/errors/LanguageNotDefinedError.d.ts +4 -0
- package/dist/errors/LanguageNotDefinedError.js +4 -0
- package/dist/errors/SpineDataNotFound.d.ts +4 -0
- package/dist/errors/SpineDataNotFound.js +4 -0
- package/dist/errors/TextureNotFound.d.ts +4 -0
- package/dist/errors/TextureNotFound.js +4 -0
- package/dist/loading/AbstractLoadingContainer.d.ts +16 -0
- package/dist/loading/AbstractLoadingContainer.js +16 -0
- package/dist/loading/SpriteLoadingContainer.d.ts +18 -0
- package/dist/loading/SpriteLoadingContainer.js +18 -0
- package/dist/localStorage/localStorage.d.ts +23 -0
- package/dist/localStorage/localStorage.js +19 -0
- package/dist/stores/SettingsStore.d.ts +276 -4
- package/dist/stores/SettingsStore.js +309 -14
- package/dist/stores/types.d.ts +4 -0
- package/dist/utils/assets/assetGetter.js +6 -3
- package/dist/utils/common/deviceOrientation.js +2 -1
- package/dist/utils/common/functions.d.ts +57 -1
- package/dist/utils/common/functions.js +63 -4
- package/dist/utils/common/logger.js +4 -2
- package/dist/utils/common/placementHelpers.d.ts +14 -0
- package/dist/utils/common/placementHelpers.js +20 -1
- package/dist/utils/common/screenHelpers.d.ts +28 -0
- package/dist/utils/common/screenHelpers.js +34 -3
- package/dist/utils/common/sound.d.ts +1 -0
- package/dist/utils/common/sound.js +2 -0
- package/dist/utils/common/stats.d.ts +1 -0
- package/dist/utils/common/stats.js +2 -0
- package/dist/winComponents/AnimableParticlesEmitter.d.ts +6 -0
- package/dist/winComponents/AnimableParticlesEmitter.js +6 -0
- package/dist/winComponents/BaseWinContainer.d.ts +64 -0
- package/dist/winComponents/BaseWinContainer.js +66 -1
- package/dist/winComponents/PositioningFrame.d.ts +7 -0
- package/dist/winComponents/PositioningFrame.js +7 -0
- package/dist/winComponents/TexturedText.d.ts +23 -0
- package/dist/winComponents/TexturedText.js +23 -0
- package/dist/winComponents/UpdatableSpineContainer.d.ts +25 -0
- package/dist/winComponents/UpdatableSpineContainer.js +25 -0
- package/package.json +1 -1
|
@@ -48,6 +48,8 @@ export class AbstractColumnsContainer extends Container {
|
|
|
48
48
|
/**
|
|
49
49
|
* Function for resolving changing symbols in columns
|
|
50
50
|
* This is used in games i.e. BoW and MB
|
|
51
|
+
* @public
|
|
52
|
+
* @returns {void}
|
|
51
53
|
*/
|
|
52
54
|
resolveMysterySpeedUp() {
|
|
53
55
|
this.allColumns.forEach((column) => {
|
|
@@ -58,8 +60,9 @@ export class AbstractColumnsContainer extends Container {
|
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
62
|
* Method for adapting to speed level
|
|
61
|
-
* @param {SpeedLevel} speedLevel new speed level
|
|
62
63
|
* @public
|
|
64
|
+
* @param {SpeedLevel} speedLevel new speed level
|
|
65
|
+
* @returns {void}
|
|
63
66
|
*/
|
|
64
67
|
adaptToSpeed(speedLevel) {
|
|
65
68
|
this.velocityMultiplier = this.speedLevelMapper[speedLevel];
|
|
@@ -82,6 +85,7 @@ export class AbstractColumnsContainer extends Container {
|
|
|
82
85
|
/**
|
|
83
86
|
* Function for clearing quick reels stop
|
|
84
87
|
* @public
|
|
88
|
+
* @returns {void}
|
|
85
89
|
*/
|
|
86
90
|
clearQuickReelsStop() {
|
|
87
91
|
this.quickReelsStop = false;
|
|
@@ -90,6 +94,7 @@ export class AbstractColumnsContainer extends Container {
|
|
|
90
94
|
/**
|
|
91
95
|
* Function for blind spinning all columns
|
|
92
96
|
* @public
|
|
97
|
+
* @returns {void}
|
|
93
98
|
*/
|
|
94
99
|
blindSpin() {
|
|
95
100
|
this.allColumns.forEach((column) => column.blindSpin());
|
|
@@ -144,11 +149,11 @@ export class AbstractColumnsContainer extends Container {
|
|
|
144
149
|
}
|
|
145
150
|
/**
|
|
146
151
|
* Function for playing all streaks
|
|
152
|
+
* @public
|
|
147
153
|
* @param {StreakReelsIndexes[]} streaks - The streaks to play
|
|
148
154
|
* @param {number} amount - The amount to play
|
|
149
155
|
* @param {SymbolId[]} allSymbols - All symbols to consider
|
|
150
156
|
* @returns {Promise<void>} - A promise that resolves when all streaks are played
|
|
151
|
-
* @public
|
|
152
157
|
*/
|
|
153
158
|
async playAllStreaks(streaks, amount, allSymbols = []) {
|
|
154
159
|
const columnsToPlay = [];
|
|
@@ -179,7 +184,7 @@ export class AbstractColumnsContainer extends Container {
|
|
|
179
184
|
}
|
|
180
185
|
/**
|
|
181
186
|
* Function for playing sound depending on the amount
|
|
182
|
-
* @
|
|
187
|
+
* @protected
|
|
183
188
|
* @param {number} amount - The amount to check
|
|
184
189
|
* @param {SymbolId[]} _allSymbols - All symbols to consider
|
|
185
190
|
* @returns {void}
|
|
@@ -204,6 +209,12 @@ export class AbstractColumnsContainer extends Container {
|
|
|
204
209
|
return;
|
|
205
210
|
}
|
|
206
211
|
}
|
|
212
|
+
/**
|
|
213
|
+
* Function for playing streak sounds
|
|
214
|
+
* @protected
|
|
215
|
+
* @param {SymbolId[]} symbols symbols of the streak
|
|
216
|
+
* @returns {void}
|
|
217
|
+
*/
|
|
207
218
|
playStreakSound(symbols) {
|
|
208
219
|
for (const [symbol, sound] of Object.entries(this.mapSymbolToSound)) {
|
|
209
220
|
if (!symbols.includes(symbol))
|
|
@@ -282,8 +293,8 @@ export class AbstractColumnsContainer extends Container {
|
|
|
282
293
|
}
|
|
283
294
|
/**
|
|
284
295
|
* Function for setting interactivity for all symbols in columns
|
|
285
|
-
* @param {boolean} flag - flag for setting interactivity
|
|
286
296
|
* @public
|
|
297
|
+
* @param {boolean} flag - flag for setting interactivity
|
|
287
298
|
* @returns {void}
|
|
288
299
|
*/
|
|
289
300
|
setInteractivityForSymbols(flag) {
|
|
@@ -291,6 +302,7 @@ export class AbstractColumnsContainer extends Container {
|
|
|
291
302
|
}
|
|
292
303
|
/**
|
|
293
304
|
* Function for handling multiple symbol transformations
|
|
305
|
+
* @public
|
|
294
306
|
* @param {DropTransformationDetails} transformations - array of transformations to apply
|
|
295
307
|
* @param {boolean} skipAnimations - flag for skipping animations
|
|
296
308
|
* @param {boolean} isStandalone - flag for standalone mode
|
|
@@ -321,12 +333,14 @@ export class AbstractColumnsContainer extends Container {
|
|
|
321
333
|
/**
|
|
322
334
|
* Function for fixing symbols columns position
|
|
323
335
|
* @public
|
|
336
|
+
* @returns {void}
|
|
324
337
|
*/
|
|
325
338
|
fixSymbolsColumnsPosition() {
|
|
326
339
|
this.allColumns.forEach((column) => column.fixStationaryPositions());
|
|
327
340
|
}
|
|
328
341
|
/**
|
|
329
342
|
* Function for preparing configuring reels end
|
|
343
|
+
* @protected
|
|
330
344
|
* @param {SymbolReels} finalSymbolReels - final symbol reels
|
|
331
345
|
* @returns {PlayableAction[]} - array of playable actions
|
|
332
346
|
*/
|
|
@@ -33,41 +33,137 @@ export declare abstract class AbstractFrame extends ResumableContainer implement
|
|
|
33
33
|
protected winLineAnimations: WinLineAnimation[];
|
|
34
34
|
protected mysteryFxCoordinates: MysteryFxCoordinates;
|
|
35
35
|
protected constructor(spineName: string);
|
|
36
|
+
/**
|
|
37
|
+
* Getter for columns container
|
|
38
|
+
* @public
|
|
39
|
+
* @returns {AbstractColumnsContainer} - columns container
|
|
40
|
+
*/
|
|
36
41
|
get columnsContainer(): AbstractColumnsContainer;
|
|
42
|
+
/**
|
|
43
|
+
* Function for adapting speed of animations and spinning in columns
|
|
44
|
+
* @public
|
|
45
|
+
* @param {SpeedLevel} speedLevel new speed level to adapt to
|
|
46
|
+
* @returns {void}
|
|
47
|
+
*/
|
|
37
48
|
adaptToSpeed(speedLevel: SpeedLevel): void;
|
|
38
49
|
/**
|
|
39
50
|
* Invoke mystery fx on symbol position
|
|
51
|
+
* @public
|
|
40
52
|
* @param {number} x - x position of reel
|
|
41
53
|
* @param {number} y - y position of reel
|
|
54
|
+
* @returns {void}
|
|
42
55
|
*/
|
|
43
56
|
invokeMysteryFx(x: number, y: number): void;
|
|
57
|
+
/**
|
|
58
|
+
* Function for repositioning the mystery FX
|
|
59
|
+
* This needs to be implemented in games with free spins
|
|
60
|
+
* If don't you this should not be implemented
|
|
61
|
+
* @protected
|
|
62
|
+
* @param {number} _x - x position of the mystery FX
|
|
63
|
+
* @param {number} _y - y position of the mystery FX
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
44
66
|
protected repositionMysteryFx(_x: number, _y: number): void;
|
|
67
|
+
/**
|
|
68
|
+
* Function for playing jackpot animation
|
|
69
|
+
* @public
|
|
70
|
+
* @param {WinTypeId} _type type of the win
|
|
71
|
+
* @returns {void}
|
|
72
|
+
*/
|
|
45
73
|
playJackpotAnimation(_type: WinTypeId): void;
|
|
74
|
+
/**
|
|
75
|
+
* Function for hiding the mystery effect
|
|
76
|
+
* @public
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
46
79
|
hideMysteryFx(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Function that resets the mystery effect coordinates
|
|
82
|
+
* @private
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
47
85
|
private resetMysteryFxCoordinates;
|
|
86
|
+
/**
|
|
87
|
+
* Function for destroying the mystery effect
|
|
88
|
+
* @public
|
|
89
|
+
* @returns {void}
|
|
90
|
+
*/
|
|
48
91
|
destroyMysteryFx(): void;
|
|
92
|
+
/**
|
|
93
|
+
* Function for resetting the bonus indicators
|
|
94
|
+
* @public
|
|
95
|
+
* @param {BonusIndicatorTypes} _type type of the bonus indicator
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
49
98
|
resetBonusIndicators(_type: BonusIndicatorTypes): void;
|
|
50
99
|
/**
|
|
51
100
|
* Create win line animation, individual for each game, based on {@link WinLineAnimation}
|
|
101
|
+
* @protected
|
|
102
|
+
* @returns {WinLineAnimation | null} - win line animation or null if not implemented
|
|
52
103
|
*/
|
|
53
104
|
protected createWinLineAnimation(_animationName: string): WinLineAnimation | null;
|
|
105
|
+
/**
|
|
106
|
+
* Function for playing all of the win line animations
|
|
107
|
+
* @public
|
|
108
|
+
* @param {string[]} animationNames - names of the animations to play
|
|
109
|
+
* @returns {Promise<void>}
|
|
110
|
+
*/
|
|
54
111
|
playAllWinLineAnimations(animationNames: string[]): Promise<void>;
|
|
55
112
|
/**
|
|
56
113
|
* Creates and plays win line animation.
|
|
114
|
+
* @public
|
|
57
115
|
* @param {string} animationName - name of the winning line to play
|
|
116
|
+
* @returns {Promise<void>}
|
|
58
117
|
*/
|
|
59
118
|
playWinLineAnimation(animationName: string): Promise<void>;
|
|
119
|
+
/**
|
|
120
|
+
* Function for stopping all of the win line animations
|
|
121
|
+
* @public
|
|
122
|
+
* @returns {void}
|
|
123
|
+
*/
|
|
60
124
|
stopPlayingWinLineAnimations(): void;
|
|
125
|
+
/**
|
|
126
|
+
* Function for checking if any win line animation is currently playing
|
|
127
|
+
* @public
|
|
128
|
+
* @returns {boolean} true if any win line animation is playing, false otherwise
|
|
129
|
+
*/
|
|
61
130
|
isPlayingWinLineAnimation(): boolean;
|
|
131
|
+
/**
|
|
132
|
+
* This function is called when the frame orientation changes
|
|
133
|
+
* This function should be implemented in each game
|
|
134
|
+
* @protected
|
|
135
|
+
* @abstract
|
|
136
|
+
* @returns {void}
|
|
137
|
+
*/
|
|
62
138
|
protected abstract changeFrameForOrientation(): void;
|
|
139
|
+
/**
|
|
140
|
+
* Function for setting the frame animation
|
|
141
|
+
* @protected
|
|
142
|
+
* @param {string} spineName - name of the spine
|
|
143
|
+
* @param {string} animationName - name of the animation
|
|
144
|
+
* @returns {void}
|
|
145
|
+
*/
|
|
63
146
|
protected setFrame(spineName: string, animationName: string): void;
|
|
147
|
+
/**
|
|
148
|
+
* Function for resizing the frame
|
|
149
|
+
* @public
|
|
150
|
+
* @returns {void}
|
|
151
|
+
*/
|
|
64
152
|
resize(): void;
|
|
153
|
+
/**
|
|
154
|
+
* Function for repositioning the frame
|
|
155
|
+
* This function should be implemented in each game
|
|
156
|
+
* @protected
|
|
157
|
+
* @abstract
|
|
158
|
+
* @returns {void}
|
|
159
|
+
*/
|
|
65
160
|
protected abstract reposition(): void;
|
|
66
161
|
/**
|
|
67
162
|
* This method is use when bonus games are triggered
|
|
68
163
|
* It is used to change the frame animation
|
|
69
164
|
* Remember to change resize for this method
|
|
70
165
|
* @protected
|
|
166
|
+
* @returns {void}
|
|
71
167
|
*/
|
|
72
168
|
protected changeForBonusGame(): void;
|
|
73
169
|
/**
|
|
@@ -75,12 +171,31 @@ export declare abstract class AbstractFrame extends ResumableContainer implement
|
|
|
75
171
|
* It is used to change the frame animation
|
|
76
172
|
* Remember to change resize for this method
|
|
77
173
|
* @abstract
|
|
174
|
+
* @returns {void}
|
|
78
175
|
*/
|
|
79
176
|
protected changeForNormalGame(): void;
|
|
177
|
+
/**
|
|
178
|
+
* This should be implemented on each game
|
|
179
|
+
* This determinate the scale of the {@link AbstractInnerFrame} and columns
|
|
180
|
+
* The scale should be determine for every device orientation
|
|
181
|
+
* @protected
|
|
182
|
+
* @abstract
|
|
183
|
+
* @returns {{ vertical: number; horizontal: number }} - The scale factors for the inner frame and columns
|
|
184
|
+
*/
|
|
80
185
|
protected abstract getFrameScale(): {
|
|
81
186
|
vertical: number;
|
|
82
187
|
horizontal: number;
|
|
83
188
|
};
|
|
189
|
+
/**
|
|
190
|
+
* Function for getting the transformed width of the frame
|
|
191
|
+
* @private
|
|
192
|
+
* @returns {number} - The transformed width
|
|
193
|
+
*/
|
|
84
194
|
private transformedWidth;
|
|
195
|
+
/**
|
|
196
|
+
* Function for getting the transformed height of the frame
|
|
197
|
+
* @private
|
|
198
|
+
* @returns {number} - The transformed height
|
|
199
|
+
*/
|
|
85
200
|
private transformedHeight;
|
|
86
201
|
}
|
|
@@ -28,20 +28,34 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
28
28
|
this.parentLayer = FrameLayer;
|
|
29
29
|
this.frameAnimation = new Spine(getSpineData(spineName));
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Getter for columns container
|
|
33
|
+
* @public
|
|
34
|
+
* @returns {AbstractColumnsContainer} - columns container
|
|
35
|
+
*/
|
|
31
36
|
get columnsContainer() {
|
|
32
37
|
return this.innerFrame.columnsContainer;
|
|
33
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Function for adapting speed of animations and spinning in columns
|
|
41
|
+
* @public
|
|
42
|
+
* @param {SpeedLevel} speedLevel new speed level to adapt to
|
|
43
|
+
* @returns {void}
|
|
44
|
+
*/
|
|
34
45
|
adaptToSpeed(speedLevel) {
|
|
35
46
|
this.velocityMultiplier = this.speedLevelMapper[speedLevel];
|
|
36
47
|
}
|
|
37
48
|
/**
|
|
38
49
|
* Invoke mystery fx on symbol position
|
|
50
|
+
* @public
|
|
39
51
|
* @param {number} x - x position of reel
|
|
40
52
|
* @param {number} y - y position of reel
|
|
53
|
+
* @returns {void}
|
|
41
54
|
*/
|
|
42
55
|
invokeMysteryFx(x, y) {
|
|
43
|
-
if (!this.mysteryFxConfig)
|
|
56
|
+
if (!this.mysteryFxConfig) {
|
|
44
57
|
return;
|
|
58
|
+
}
|
|
45
59
|
if (this.mysteryFxHighlight) {
|
|
46
60
|
SoundManager.pause(SoundTracks.mysteryFxLoop);
|
|
47
61
|
this.removeChild(this.mysteryFxHighlight);
|
|
@@ -59,11 +73,32 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
59
73
|
});
|
|
60
74
|
this.addChild(this.mysteryFxHighlight);
|
|
61
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Function for repositioning the mystery FX
|
|
78
|
+
* This needs to be implemented in games with free spins
|
|
79
|
+
* If don't you this should not be implemented
|
|
80
|
+
* @protected
|
|
81
|
+
* @param {number} _x - x position of the mystery FX
|
|
82
|
+
* @param {number} _y - y position of the mystery FX
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
62
85
|
repositionMysteryFx(_x, _y) { }
|
|
86
|
+
/**
|
|
87
|
+
* Function for playing jackpot animation
|
|
88
|
+
* @public
|
|
89
|
+
* @param {WinTypeId} _type type of the win
|
|
90
|
+
* @returns {void}
|
|
91
|
+
*/
|
|
63
92
|
playJackpotAnimation(_type) { }
|
|
93
|
+
/**
|
|
94
|
+
* Function for hiding the mystery effect
|
|
95
|
+
* @public
|
|
96
|
+
* @returns {void}
|
|
97
|
+
*/
|
|
64
98
|
hideMysteryFx() {
|
|
65
|
-
if (!this.mysteryFxConfig)
|
|
99
|
+
if (!this.mysteryFxConfig) {
|
|
66
100
|
return;
|
|
101
|
+
}
|
|
67
102
|
if (!this.mysteryFxConfig.endAnimationName) {
|
|
68
103
|
SoundManager.stop(SoundTracks.mysteryFxLoop);
|
|
69
104
|
return;
|
|
@@ -76,9 +111,19 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
76
111
|
return;
|
|
77
112
|
}
|
|
78
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Function that resets the mystery effect coordinates
|
|
116
|
+
* @private
|
|
117
|
+
* @returns {void}
|
|
118
|
+
*/
|
|
79
119
|
resetMysteryFxCoordinates() {
|
|
80
120
|
this.mysteryFxCoordinates = { x: 0, y: 0 };
|
|
81
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Function for destroying the mystery effect
|
|
124
|
+
* @public
|
|
125
|
+
* @returns {void}
|
|
126
|
+
*/
|
|
82
127
|
destroyMysteryFx() {
|
|
83
128
|
if (this.mysteryFxHighlight) {
|
|
84
129
|
SoundManager.stop(SoundTracks.mysteryFxLoop);
|
|
@@ -87,19 +132,35 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
87
132
|
this.mysteryFxHighlight = null;
|
|
88
133
|
}
|
|
89
134
|
}
|
|
135
|
+
/**
|
|
136
|
+
* Function for resetting the bonus indicators
|
|
137
|
+
* @public
|
|
138
|
+
* @param {BonusIndicatorTypes} _type type of the bonus indicator
|
|
139
|
+
* @returns {void}
|
|
140
|
+
*/
|
|
90
141
|
resetBonusIndicators(_type) { }
|
|
91
142
|
/**
|
|
92
143
|
* Create win line animation, individual for each game, based on {@link WinLineAnimation}
|
|
144
|
+
* @protected
|
|
145
|
+
* @returns {WinLineAnimation | null} - win line animation or null if not implemented
|
|
93
146
|
*/
|
|
94
147
|
createWinLineAnimation(_animationName) {
|
|
95
148
|
return null;
|
|
96
149
|
}
|
|
150
|
+
/**
|
|
151
|
+
* Function for playing all of the win line animations
|
|
152
|
+
* @public
|
|
153
|
+
* @param {string[]} animationNames - names of the animations to play
|
|
154
|
+
* @returns {Promise<void>}
|
|
155
|
+
*/
|
|
97
156
|
async playAllWinLineAnimations(animationNames) {
|
|
98
157
|
await Promise.allSettled(animationNames.map((animationName) => this.playWinLineAnimation(animationName)));
|
|
99
158
|
}
|
|
100
159
|
/**
|
|
101
160
|
* Creates and plays win line animation.
|
|
161
|
+
* @public
|
|
102
162
|
* @param {string} animationName - name of the winning line to play
|
|
163
|
+
* @returns {Promise<void>}
|
|
103
164
|
*/
|
|
104
165
|
async playWinLineAnimation(animationName) {
|
|
105
166
|
const winLineAnimation = this.createWinLineAnimation(animationName);
|
|
@@ -114,13 +175,30 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
114
175
|
this.removeChild(winLineAnimation);
|
|
115
176
|
this.stopPlayingWinLineAnimations();
|
|
116
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* Function for stopping all of the win line animations
|
|
180
|
+
* @public
|
|
181
|
+
* @returns {void}
|
|
182
|
+
*/
|
|
117
183
|
stopPlayingWinLineAnimations() {
|
|
118
184
|
this.winLineAnimations.map((winLineAnimation) => winLineAnimation.resolvePlayingPromise());
|
|
119
185
|
this.winLineAnimations = [];
|
|
120
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Function for checking if any win line animation is currently playing
|
|
189
|
+
* @public
|
|
190
|
+
* @returns {boolean} true if any win line animation is playing, false otherwise
|
|
191
|
+
*/
|
|
121
192
|
isPlayingWinLineAnimation() {
|
|
122
193
|
return this.winLineAnimations.length > 0;
|
|
123
194
|
}
|
|
195
|
+
/**
|
|
196
|
+
* Function for setting the frame animation
|
|
197
|
+
* @protected
|
|
198
|
+
* @param {string} spineName - name of the spine
|
|
199
|
+
* @param {string} animationName - name of the animation
|
|
200
|
+
* @returns {void}
|
|
201
|
+
*/
|
|
124
202
|
setFrame(spineName, animationName) {
|
|
125
203
|
this.columnsContainer.doResize();
|
|
126
204
|
this.frameAnimation = new Spine(getSpineData(spineName));
|
|
@@ -130,6 +208,11 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
130
208
|
this.addChild(this.frameAnimation);
|
|
131
209
|
this.addChild(this.innerFrame);
|
|
132
210
|
}
|
|
211
|
+
/**
|
|
212
|
+
* Function for resizing the frame
|
|
213
|
+
* @public
|
|
214
|
+
* @returns {void}
|
|
215
|
+
*/
|
|
133
216
|
resize() {
|
|
134
217
|
if (this.mysteryFxHighlight) {
|
|
135
218
|
SoundManager.pause(SoundTracks.mysteryFxLoop);
|
|
@@ -158,6 +241,7 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
158
241
|
* It is used to change the frame animation
|
|
159
242
|
* Remember to change resize for this method
|
|
160
243
|
* @protected
|
|
244
|
+
* @returns {void}
|
|
161
245
|
*/
|
|
162
246
|
changeForBonusGame() { }
|
|
163
247
|
/**
|
|
@@ -165,11 +249,22 @@ export class AbstractFrame extends ResumableContainer {
|
|
|
165
249
|
* It is used to change the frame animation
|
|
166
250
|
* Remember to change resize for this method
|
|
167
251
|
* @abstract
|
|
252
|
+
* @returns {void}
|
|
168
253
|
*/
|
|
169
254
|
changeForNormalGame() { }
|
|
255
|
+
/**
|
|
256
|
+
* Function for getting the transformed width of the frame
|
|
257
|
+
* @private
|
|
258
|
+
* @returns {number} - The transformed width
|
|
259
|
+
*/
|
|
170
260
|
transformedWidth() {
|
|
171
261
|
return RainMan.app.screen.width * this.getFrameScale().horizontal;
|
|
172
262
|
}
|
|
263
|
+
/**
|
|
264
|
+
* Function for getting the transformed height of the frame
|
|
265
|
+
* @private
|
|
266
|
+
* @returns {number} - The transformed height
|
|
267
|
+
*/
|
|
173
268
|
transformedHeight() {
|
|
174
269
|
return RainMan.app.screen.height * this.getFrameScale().vertical;
|
|
175
270
|
}
|
|
@@ -11,5 +11,10 @@ export declare abstract class AbstractInnerFrame extends Container {
|
|
|
11
11
|
static readonly registryName = "innerFrame";
|
|
12
12
|
protected abstract _columnsContainer: AbstractColumnsContainer;
|
|
13
13
|
protected constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Getter for columns container
|
|
16
|
+
* @public
|
|
17
|
+
* @returns {AbstractColumnsContainer} - The columns container
|
|
18
|
+
*/
|
|
14
19
|
get columnsContainer(): AbstractColumnsContainer;
|
|
15
20
|
}
|
|
@@ -14,6 +14,11 @@ export class AbstractInnerFrame extends Container {
|
|
|
14
14
|
this.name = AbstractInnerFrame.registryName;
|
|
15
15
|
this.parentLayer = FrameLayer;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Getter for columns container
|
|
19
|
+
* @public
|
|
20
|
+
* @returns {AbstractColumnsContainer} - The columns container
|
|
21
|
+
*/
|
|
17
22
|
get columnsContainer() {
|
|
18
23
|
return this._columnsContainer;
|
|
19
24
|
}
|
|
@@ -11,6 +11,16 @@ export declare class WinLineAnimation extends Spine {
|
|
|
11
11
|
private readonly velocityMultiplier;
|
|
12
12
|
private resolver?;
|
|
13
13
|
constructor(spineName: string, animationName: string, velocityMultiplier: number);
|
|
14
|
+
/**
|
|
15
|
+
* Function for playing the win line animation
|
|
16
|
+
* @public
|
|
17
|
+
* @returns {Promise<void>} - A promise that resolves when the animation is complete
|
|
18
|
+
*/
|
|
14
19
|
play(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Resolves the promise when the animation is complete
|
|
22
|
+
* @public
|
|
23
|
+
* @returns {void}
|
|
24
|
+
*/
|
|
15
25
|
resolvePlayingPromise(): void;
|
|
16
26
|
}
|
|
@@ -18,6 +18,11 @@ export class WinLineAnimation extends Spine {
|
|
|
18
18
|
this.animationName = animationName;
|
|
19
19
|
this.velocityMultiplier = velocityMultiplier;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Function for playing the win line animation
|
|
23
|
+
* @public
|
|
24
|
+
* @returns {Promise<void>} - A promise that resolves when the animation is complete
|
|
25
|
+
*/
|
|
21
26
|
async play() {
|
|
22
27
|
if (this.animationName.length < RainMan.config.numberOfColumns)
|
|
23
28
|
return;
|
|
@@ -31,9 +36,15 @@ export class WinLineAnimation extends Spine {
|
|
|
31
36
|
});
|
|
32
37
|
});
|
|
33
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* Resolves the promise when the animation is complete
|
|
41
|
+
* @public
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
34
44
|
resolvePlayingPromise() {
|
|
35
|
-
if (!this.resolver)
|
|
45
|
+
if (!this.resolver) {
|
|
36
46
|
return;
|
|
47
|
+
}
|
|
37
48
|
this.resolver();
|
|
38
49
|
this.resolver = undefined;
|
|
39
50
|
}
|
|
@@ -9,6 +9,9 @@ export declare const WIN_MULTIPLIER_VALUES: {
|
|
|
9
9
|
readonly HIGH_WIN_MAX: 15;
|
|
10
10
|
readonly VERY_HIGH_WIN: 15.1;
|
|
11
11
|
};
|
|
12
|
+
/**
|
|
13
|
+
* Object containing the values for the bonus indicators.
|
|
14
|
+
*/
|
|
12
15
|
export declare const BONUS_INDICATORS: {
|
|
13
16
|
readonly joker: "joker";
|
|
14
17
|
readonly freeSpins: "freeSpins";
|
|
@@ -21,4 +24,8 @@ export declare const BONUS_INDICATORS: {
|
|
|
21
24
|
* @typedef {WinMultiplierValues}
|
|
22
25
|
*/
|
|
23
26
|
export type WinMultiplierValues = (typeof WIN_MULTIPLIER_VALUES)[keyof typeof WIN_MULTIPLIER_VALUES];
|
|
27
|
+
/**
|
|
28
|
+
* Type for the bonus indicator types.
|
|
29
|
+
* @typedef {BonusIndicatorTypes}
|
|
30
|
+
*/
|
|
24
31
|
export type BonusIndicatorTypes = (typeof BONUS_INDICATORS)[keyof typeof BONUS_INDICATORS];
|
package/dist/components/index.js
CHANGED
|
@@ -34,31 +34,45 @@ export declare class MessageBox extends Container {
|
|
|
34
34
|
constructor();
|
|
35
35
|
/**
|
|
36
36
|
* Updates the incentive text displayed in the message box.
|
|
37
|
+
* @public
|
|
37
38
|
* @param {string} newText - The new text to display.
|
|
39
|
+
* @returns {void}
|
|
38
40
|
*/
|
|
39
41
|
updateIncentiveText(newText: string): void;
|
|
40
42
|
/**
|
|
41
43
|
* Function for hiding current win text
|
|
44
|
+
* @public
|
|
45
|
+
* @returns {void}
|
|
42
46
|
*/
|
|
43
47
|
hideCurrentWinText(): void;
|
|
44
48
|
/**
|
|
45
49
|
* Function fro hiding possible win text
|
|
50
|
+
* @public
|
|
51
|
+
* @returns {void}
|
|
46
52
|
*/
|
|
47
53
|
hidePossibleWinText(): void;
|
|
48
54
|
/**
|
|
49
55
|
* Function for hiding free spin text
|
|
56
|
+
* @public
|
|
57
|
+
* @returns {void}
|
|
50
58
|
*/
|
|
51
59
|
hideFreeSpinText(): void;
|
|
52
60
|
/**
|
|
53
61
|
* Function for hiding auto spin text
|
|
62
|
+
* @public
|
|
63
|
+
* @returns {void}
|
|
54
64
|
*/
|
|
55
65
|
hideAutoSpinText(): void;
|
|
56
66
|
/**
|
|
57
67
|
* Function for hiding incentive text
|
|
68
|
+
* @public
|
|
69
|
+
* @returns {void}
|
|
58
70
|
*/
|
|
59
71
|
hideIncentiveText(): void;
|
|
60
72
|
/**
|
|
61
73
|
* Function for hiding win line indicator
|
|
74
|
+
* @public
|
|
75
|
+
* @returns {void}
|
|
62
76
|
*/
|
|
63
77
|
hideWinLineIndicator(): void;
|
|
64
78
|
/**
|
|
@@ -66,24 +80,35 @@ export declare class MessageBox extends Container {
|
|
|
66
80
|
* It sets the scale of the message box to the global minimum ratio.
|
|
67
81
|
* If the device orientation is mobile and the win line indicator is shown, it repositions
|
|
68
82
|
* the win line indicator to ensure it is displayed correctly.
|
|
83
|
+
* @public
|
|
69
84
|
* @memberof MessageBox
|
|
85
|
+
* @returns {void}
|
|
70
86
|
*/
|
|
71
87
|
resize(): void;
|
|
72
88
|
/**
|
|
73
89
|
* Getter for the height of the win line animation.
|
|
74
90
|
* If the win line indicator is not defined, it returns 0.
|
|
91
|
+
* @public
|
|
75
92
|
* @returns {number} The height of the win line animation.
|
|
76
93
|
*/
|
|
77
94
|
get winLineAnimationHeight(): number;
|
|
78
95
|
/**
|
|
79
96
|
* Displays the current win text in the message box.
|
|
97
|
+
* @public
|
|
80
98
|
* @returns {void}
|
|
81
99
|
*/
|
|
82
100
|
showCurrentWinText(): void;
|
|
101
|
+
/**
|
|
102
|
+
* Displays the possible win text in the message box.
|
|
103
|
+
* It also checks if the text is already shown.
|
|
104
|
+
* @public
|
|
105
|
+
* @returns {void}
|
|
106
|
+
*/
|
|
83
107
|
showPossibleWinText(): void;
|
|
84
108
|
/**
|
|
85
109
|
* Displays the auto spin text in the message box.
|
|
86
110
|
* It checks if auto spins are enabled and if the text is already shown.
|
|
111
|
+
* @public
|
|
87
112
|
* @returns {void}
|
|
88
113
|
*/
|
|
89
114
|
showAutoSpinText(): void;
|
|
@@ -91,18 +116,26 @@ export declare class MessageBox extends Container {
|
|
|
91
116
|
* Displays the free spin text in the message box.
|
|
92
117
|
* It checks if free spins are enabled and if the text is already shown.
|
|
93
118
|
* If free spin text is disabled in the configuration, it does nothing.
|
|
119
|
+
* @public
|
|
94
120
|
* @returns {void}
|
|
95
121
|
*/
|
|
96
122
|
showFreeSpinText(): void;
|
|
123
|
+
/**
|
|
124
|
+
* Displays the incentive text in the message box.
|
|
125
|
+
* @public
|
|
126
|
+
* @returns {void}
|
|
127
|
+
*/
|
|
97
128
|
showIncentiveText(): void;
|
|
98
129
|
/**
|
|
99
130
|
* Function to center a text component on the X-axis of the message box.
|
|
131
|
+
* @private
|
|
100
132
|
* @param {Container | undefined} component container component to center
|
|
101
133
|
* @returns {void}
|
|
102
134
|
*/
|
|
103
135
|
private centerTextOnX;
|
|
104
136
|
/**
|
|
105
137
|
* Displays the win line indicator in the message box.
|
|
138
|
+
* @public
|
|
106
139
|
* @param {string} message The message to display.
|
|
107
140
|
* @param {(symbolId: SymbolId, suffix?: string) => string} getImageForSymbolId Function to get the image for a symbol ID.
|
|
108
141
|
* @param {SymbolId[]} symbolIds The symbol IDs to display.
|