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
|
@@ -3,6 +3,9 @@ import { SpeedLevel } from "../application";
|
|
|
3
3
|
import { RegistryMap } from "./types";
|
|
4
4
|
/**
|
|
5
5
|
* Class for managing components in game
|
|
6
|
+
* Especially for managing components that are speed adaptable and updating the text.
|
|
7
|
+
* This is important for the game logic, as it allows to change the speed of the game
|
|
8
|
+
* and update the components that are speed adaptable.
|
|
6
9
|
* @class ComponentRegistry
|
|
7
10
|
*/
|
|
8
11
|
export declare class ComponentRegistry {
|
|
@@ -15,22 +18,26 @@ export declare class ComponentRegistry {
|
|
|
15
18
|
* Method for changing temporarily speed for turbo spin
|
|
16
19
|
* @public
|
|
17
20
|
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
21
|
+
* @returns {void}
|
|
18
22
|
*/
|
|
19
23
|
setTemporarySpeedLevel(newSpeedLevel: SpeedLevel): void;
|
|
20
24
|
/**
|
|
21
25
|
* Method for reverting speed level for turbo spin
|
|
22
26
|
* @public
|
|
27
|
+
* @returns {void}
|
|
23
28
|
*/
|
|
24
29
|
revertTemporarySpeedLevel(): void;
|
|
25
30
|
/**
|
|
26
31
|
* Setter fo speed level
|
|
27
32
|
* @public
|
|
28
33
|
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
34
|
+
* @returns {void}
|
|
29
35
|
*/
|
|
30
36
|
setSpeedLevel(newSpeedLevel: SpeedLevel): void;
|
|
31
37
|
/**
|
|
32
38
|
* Setting the next available speed level
|
|
33
39
|
* @public
|
|
40
|
+
* @returns {void}
|
|
34
41
|
*/
|
|
35
42
|
nextSpeedLevel(): void;
|
|
36
43
|
/**
|
|
@@ -42,12 +49,14 @@ export declare class ComponentRegistry {
|
|
|
42
49
|
/**
|
|
43
50
|
* Setter for user activity time
|
|
44
51
|
* @public
|
|
52
|
+
* @returns {void}
|
|
45
53
|
*/
|
|
46
54
|
setUserActivityTime(): void;
|
|
47
55
|
/**
|
|
48
56
|
* Function for adding components into ComponentRegistry
|
|
49
57
|
* @public
|
|
50
58
|
* @param {Container} component component to be added
|
|
59
|
+
* @returns {void}
|
|
51
60
|
*/
|
|
52
61
|
add(component: Container): void;
|
|
53
62
|
/**
|
|
@@ -55,18 +64,21 @@ export declare class ComponentRegistry {
|
|
|
55
64
|
* @public
|
|
56
65
|
* @param {Container} oldComponent - old component
|
|
57
66
|
* @param {Container} newComponent - new component
|
|
67
|
+
* @returns {void}
|
|
58
68
|
*/
|
|
59
69
|
update(oldComponent: Container, newComponent: Container): void;
|
|
60
70
|
/**
|
|
61
71
|
* Function for removing components from Component Registry
|
|
62
72
|
* @public
|
|
63
73
|
* @param {Container} component - component to be removed
|
|
74
|
+
* @returns {void}
|
|
64
75
|
*/
|
|
65
76
|
remove(component: Container): void;
|
|
66
77
|
/**
|
|
67
78
|
* Function that adapt speed of all components
|
|
68
79
|
* @public
|
|
69
|
-
* @param {SpeedLevel} speedLevel
|
|
80
|
+
* @param {SpeedLevel} speedLevel new speed level to adapt
|
|
81
|
+
* @returns {void}
|
|
70
82
|
*/
|
|
71
83
|
updateAllSpeedAdaptable(speedLevel: SpeedLevel): void;
|
|
72
84
|
/**
|
|
@@ -74,36 +86,38 @@ export declare class ComponentRegistry {
|
|
|
74
86
|
* Throws error if component is not present
|
|
75
87
|
* @public
|
|
76
88
|
* @template {keyof RegistryMap} T
|
|
77
|
-
* @param {T} componentName
|
|
78
|
-
* @returns {RegistryMap[T]}
|
|
89
|
+
* @param {T} componentName name of the component
|
|
90
|
+
* @returns {RegistryMap[T]} component from registry
|
|
79
91
|
*/
|
|
80
92
|
get<T extends keyof RegistryMap>(componentName: T): RegistryMap[T];
|
|
81
93
|
/**
|
|
82
94
|
* Getter for existing components that are in ComponentRegistry
|
|
83
95
|
* @public
|
|
84
96
|
* @template {keyof RegistryMap} T
|
|
85
|
-
* @param {T} componentName
|
|
86
|
-
* @returns {RegistryMap[T]}
|
|
97
|
+
* @param {T} componentName component name
|
|
98
|
+
* @returns {RegistryMap[T]} component from registry
|
|
87
99
|
*/
|
|
88
100
|
getIfExists<T extends keyof RegistryMap>(componentName: T): RegistryMap[T];
|
|
89
101
|
/**
|
|
90
102
|
* Helper function to check if the component is present in ComponentRegistry
|
|
91
103
|
* @public
|
|
92
104
|
* @template {keyof RegistryMap} T
|
|
93
|
-
* @param {T} componentName
|
|
94
|
-
* @returns {boolean}
|
|
105
|
+
* @param {T} componentName component name
|
|
106
|
+
* @returns {boolean} true if component is present otherwise false
|
|
95
107
|
*/
|
|
96
108
|
has<T extends keyof RegistryMap>(componentName: T): boolean;
|
|
97
109
|
/**
|
|
98
110
|
* Function for adding components
|
|
99
111
|
* @public
|
|
100
|
-
* @param {Container[]} components
|
|
112
|
+
* @param {Container[]} components components to be added
|
|
113
|
+
* @returns {void}
|
|
101
114
|
*/
|
|
102
115
|
addMany(components: Container[]): void;
|
|
103
116
|
/**
|
|
104
117
|
* Function for removing components
|
|
105
118
|
* @public
|
|
106
|
-
* @param {Container[]} components
|
|
119
|
+
* @param {Container[]} components components to be removed
|
|
120
|
+
* @returns {void}
|
|
107
121
|
*/
|
|
108
122
|
removeMany(components: Container[]): void;
|
|
109
123
|
}
|
|
@@ -4,6 +4,9 @@ import { RainMan } from "../Rainman";
|
|
|
4
4
|
import { openFullscreen } from "../utils";
|
|
5
5
|
/**
|
|
6
6
|
* Class for managing components in game
|
|
7
|
+
* Especially for managing components that are speed adaptable and updating the text.
|
|
8
|
+
* This is important for the game logic, as it allows to change the speed of the game
|
|
9
|
+
* and update the components that are speed adaptable.
|
|
7
10
|
* @class ComponentRegistry
|
|
8
11
|
*/
|
|
9
12
|
export class ComponentRegistry {
|
|
@@ -21,6 +24,7 @@ export class ComponentRegistry {
|
|
|
21
24
|
* Method for changing temporarily speed for turbo spin
|
|
22
25
|
* @public
|
|
23
26
|
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
27
|
+
* @returns {void}
|
|
24
28
|
*/
|
|
25
29
|
setTemporarySpeedLevel(newSpeedLevel) {
|
|
26
30
|
this.speedLevelHandler.setSpeed(newSpeedLevel);
|
|
@@ -29,6 +33,7 @@ export class ComponentRegistry {
|
|
|
29
33
|
/**
|
|
30
34
|
* Method for reverting speed level for turbo spin
|
|
31
35
|
* @public
|
|
36
|
+
* @returns {void}
|
|
32
37
|
*/
|
|
33
38
|
revertTemporarySpeedLevel() {
|
|
34
39
|
this.speedLevelHandler.setSpeed(RainMan.settingsStore.currentSpeed);
|
|
@@ -38,6 +43,7 @@ export class ComponentRegistry {
|
|
|
38
43
|
* Setter fo speed level
|
|
39
44
|
* @public
|
|
40
45
|
* @param {SpeedLevel} newSpeedLevel - new speed level
|
|
46
|
+
* @returns {void}
|
|
41
47
|
*/
|
|
42
48
|
setSpeedLevel(newSpeedLevel) {
|
|
43
49
|
this.speedLevelHandler.setSpeed(newSpeedLevel);
|
|
@@ -48,6 +54,7 @@ export class ComponentRegistry {
|
|
|
48
54
|
/**
|
|
49
55
|
* Setting the next available speed level
|
|
50
56
|
* @public
|
|
57
|
+
* @returns {void}
|
|
51
58
|
*/
|
|
52
59
|
nextSpeedLevel() {
|
|
53
60
|
this.speedLevelHandler.nextSpeed();
|
|
@@ -66,6 +73,7 @@ export class ComponentRegistry {
|
|
|
66
73
|
/**
|
|
67
74
|
* Setter for user activity time
|
|
68
75
|
* @public
|
|
76
|
+
* @returns {void}
|
|
69
77
|
*/
|
|
70
78
|
setUserActivityTime() {
|
|
71
79
|
this.incentiveJobsManager.updateLastTimeClicked();
|
|
@@ -74,6 +82,7 @@ export class ComponentRegistry {
|
|
|
74
82
|
* Function for adding components into ComponentRegistry
|
|
75
83
|
* @public
|
|
76
84
|
* @param {Container} component component to be added
|
|
85
|
+
* @returns {void}
|
|
77
86
|
*/
|
|
78
87
|
add(component) {
|
|
79
88
|
if (isSpeedAdapterInterface(component)) {
|
|
@@ -96,6 +105,7 @@ export class ComponentRegistry {
|
|
|
96
105
|
* @public
|
|
97
106
|
* @param {Container} oldComponent - old component
|
|
98
107
|
* @param {Container} newComponent - new component
|
|
108
|
+
* @returns {void}
|
|
99
109
|
*/
|
|
100
110
|
update(oldComponent, newComponent) {
|
|
101
111
|
if (oldComponent.name !== newComponent.name) {
|
|
@@ -107,13 +117,15 @@ export class ComponentRegistry {
|
|
|
107
117
|
this.speedAdaptableComponents.add(newComponent);
|
|
108
118
|
}
|
|
109
119
|
}
|
|
110
|
-
if (oldComponent.name)
|
|
120
|
+
if (oldComponent.name) {
|
|
111
121
|
this.registry.set(oldComponent.name, newComponent);
|
|
122
|
+
}
|
|
112
123
|
}
|
|
113
124
|
/**
|
|
114
125
|
* Function for removing components from Component Registry
|
|
115
126
|
* @public
|
|
116
127
|
* @param {Container} component - component to be removed
|
|
128
|
+
* @returns {void}
|
|
117
129
|
*/
|
|
118
130
|
remove(component) {
|
|
119
131
|
if (component.name)
|
|
@@ -122,7 +134,8 @@ export class ComponentRegistry {
|
|
|
122
134
|
/**
|
|
123
135
|
* Function that adapt speed of all components
|
|
124
136
|
* @public
|
|
125
|
-
* @param {SpeedLevel} speedLevel
|
|
137
|
+
* @param {SpeedLevel} speedLevel new speed level to adapt
|
|
138
|
+
* @returns {void}
|
|
126
139
|
*/
|
|
127
140
|
updateAllSpeedAdaptable(speedLevel) {
|
|
128
141
|
this.speedAdaptableComponents.forEach((speedAdaptableComponent) => {
|
|
@@ -134,8 +147,8 @@ export class ComponentRegistry {
|
|
|
134
147
|
* Throws error if component is not present
|
|
135
148
|
* @public
|
|
136
149
|
* @template {keyof RegistryMap} T
|
|
137
|
-
* @param {T} componentName
|
|
138
|
-
* @returns {RegistryMap[T]}
|
|
150
|
+
* @param {T} componentName name of the component
|
|
151
|
+
* @returns {RegistryMap[T]} component from registry
|
|
139
152
|
*/
|
|
140
153
|
get(componentName) {
|
|
141
154
|
const componentToReturn = this.registry.get(componentName);
|
|
@@ -148,8 +161,8 @@ export class ComponentRegistry {
|
|
|
148
161
|
* Getter for existing components that are in ComponentRegistry
|
|
149
162
|
* @public
|
|
150
163
|
* @template {keyof RegistryMap} T
|
|
151
|
-
* @param {T} componentName
|
|
152
|
-
* @returns {RegistryMap[T]}
|
|
164
|
+
* @param {T} componentName component name
|
|
165
|
+
* @returns {RegistryMap[T]} component from registry
|
|
153
166
|
*/
|
|
154
167
|
getIfExists(componentName) {
|
|
155
168
|
const componentToReturn = this.registry.get(componentName);
|
|
@@ -159,8 +172,8 @@ export class ComponentRegistry {
|
|
|
159
172
|
* Helper function to check if the component is present in ComponentRegistry
|
|
160
173
|
* @public
|
|
161
174
|
* @template {keyof RegistryMap} T
|
|
162
|
-
* @param {T} componentName
|
|
163
|
-
* @returns {boolean}
|
|
175
|
+
* @param {T} componentName component name
|
|
176
|
+
* @returns {boolean} true if component is present otherwise false
|
|
164
177
|
*/
|
|
165
178
|
has(componentName) {
|
|
166
179
|
return this.registry.has(componentName);
|
|
@@ -168,7 +181,8 @@ export class ComponentRegistry {
|
|
|
168
181
|
/**
|
|
169
182
|
* Function for adding components
|
|
170
183
|
* @public
|
|
171
|
-
* @param {Container[]} components
|
|
184
|
+
* @param {Container[]} components components to be added
|
|
185
|
+
* @returns {void}
|
|
172
186
|
*/
|
|
173
187
|
addMany(components) {
|
|
174
188
|
for (const component of components) {
|
|
@@ -178,7 +192,8 @@ export class ComponentRegistry {
|
|
|
178
192
|
/**
|
|
179
193
|
* Function for removing components
|
|
180
194
|
* @public
|
|
181
|
-
* @param {Container[]} components
|
|
195
|
+
* @param {Container[]} components components to be removed
|
|
196
|
+
* @returns {void}
|
|
182
197
|
*/
|
|
183
198
|
removeMany(components) {
|
|
184
199
|
for (const component of components) {
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import { AbstractColumnsContainer, AbstractFrame, AbstractInnerFrame, AutoplayButton, Background,
|
|
1
|
+
import { AbstractColumnsContainer, AbstractFrame, AbstractInnerFrame, AutoplayButton, Background, BUTTONS, COMPONENTS, FreeSpinButton, GambleButton, InfoButton, MessageBox, MoreButton, NegButton, PlusButton, RefreshButton, SpeedControlButton, StylefulUpdatableText, TakeButton, UpdatableTextComponent, UpdatableValueComponent, VolumeButton } from "../components";
|
|
2
2
|
/**
|
|
3
3
|
* RegistryMap is a map of all components that are registered in the ComponentRegistry.
|
|
4
4
|
* It is used to type-check the components that are registered in the ComponentRegistry.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
5
|
*/
|
|
8
6
|
export interface RegistryMap {
|
|
9
7
|
[MessageBox.autoSpinTextRegistryName]: UpdatableValueComponent;
|
|
@@ -24,7 +22,8 @@ export interface RegistryMap {
|
|
|
24
22
|
[NegButton.registryName]: NegButton;
|
|
25
23
|
[InfoButton.registryName]: InfoButton;
|
|
26
24
|
[MoreButton.registryName]: MoreButton;
|
|
27
|
-
[BUTTONS.gamble]:
|
|
25
|
+
[BUTTONS.gamble]: GambleButton;
|
|
26
|
+
[BUTTONS.take]: TakeButton;
|
|
28
27
|
[COMPONENTS.betText]: UpdatableTextComponent;
|
|
29
28
|
[COMPONENTS.creditText]: UpdatableTextComponent;
|
|
30
29
|
[COMPONENTS.bigWin]: StylefulUpdatableText;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { Nullable, PlayableAction } from "../utils";
|
|
2
2
|
/**
|
|
3
3
|
* Class representing a described playable action in action queue.
|
|
4
|
+
* @template T - Type of the action
|
|
5
|
+
* @class DescribedPlayableAction
|
|
4
6
|
*/
|
|
5
7
|
export declare class DescribedPlayableAction<T> {
|
|
6
8
|
readonly type: T;
|
package/dist/Money/MoneyText.js
CHANGED
|
@@ -10,6 +10,11 @@ export class MoneyText {
|
|
|
10
10
|
constructor(amount) {
|
|
11
11
|
this.money = Money.fromDecimal(amount, RainMan.globals.currency, Math.round);
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Function for converting money to string with currency symbol included
|
|
15
|
+
* @public
|
|
16
|
+
* @returns {string} money as string
|
|
17
|
+
*/
|
|
13
18
|
toString() {
|
|
14
19
|
return `${this.money} ${RainMan.globals.currency.symbol_native}`;
|
|
15
20
|
}
|
package/dist/Rainman/types.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { autorun } from "mobx";
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { RainMan } from "../../../Rainman";
|
|
4
|
+
/**
|
|
5
|
+
* Get the available options for buying free spins
|
|
6
|
+
* @returns {BuyFreeSpinOption[]} the available options for buying free spins
|
|
7
|
+
*/
|
|
4
8
|
export const useBuyFreeSpinOptions = () => {
|
|
5
9
|
const [options, setOptions] = useState([]);
|
|
6
10
|
useEffect(() => {
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { useEffect, useState } from "react";
|
|
2
2
|
import { getDeviceOrientation } from "../../utils";
|
|
3
|
+
/**
|
|
4
|
+
* Get the current device orientation
|
|
5
|
+
* @returns {DeviceOrientation} the current device orientation
|
|
6
|
+
*/
|
|
3
7
|
export const useDeviceOrientations = () => {
|
|
4
8
|
const [deviceOrientation, setDeviceOrientation] = useState("pc");
|
|
5
9
|
useEffect(() => {
|
|
@@ -10,14 +10,15 @@ import { WinTypeId } from "./WinTypeId";
|
|
|
10
10
|
*/
|
|
11
11
|
export declare class ApiConfig {
|
|
12
12
|
readonly token: string;
|
|
13
|
+
extraData: InitExtraData;
|
|
13
14
|
symbolMap: Map<number, never>;
|
|
14
15
|
streakMap: Map<string, number>;
|
|
15
16
|
private readonly bets;
|
|
16
17
|
private winMap;
|
|
17
18
|
private transformationMap;
|
|
18
|
-
extraData: InitExtraData;
|
|
19
19
|
/**
|
|
20
20
|
* Create instance of ApiConfig, requires InitDataInterface
|
|
21
|
+
* @public
|
|
21
22
|
* @param {InitDataInterface} data - initail data from backend
|
|
22
23
|
*/
|
|
23
24
|
constructor(data: InitDataInterface);
|
|
@@ -8,14 +8,15 @@ import { isBlindsConfiguredByTransformations } from "../SpinLogic";
|
|
|
8
8
|
*/
|
|
9
9
|
export class ApiConfig {
|
|
10
10
|
token;
|
|
11
|
+
extraData;
|
|
11
12
|
symbolMap = new Map();
|
|
12
13
|
streakMap = new Map();
|
|
13
14
|
bets;
|
|
14
15
|
winMap = new Map();
|
|
15
16
|
transformationMap = new Map();
|
|
16
|
-
extraData;
|
|
17
17
|
/**
|
|
18
18
|
* Create instance of ApiConfig, requires InitDataInterface
|
|
19
|
+
* @public
|
|
19
20
|
* @param {InitDataInterface} data - initail data from backend
|
|
20
21
|
*/
|
|
21
22
|
constructor(data) {
|
|
@@ -170,7 +171,7 @@ export class ApiConfig {
|
|
|
170
171
|
*/
|
|
171
172
|
initSymbolMap(data) {
|
|
172
173
|
if (Object.keys(RainMan.symbolIds).length !== data.symbols.length) {
|
|
173
|
-
logError(
|
|
174
|
+
logError("🛑 SYMBOL_IDS does not match symbols_names!");
|
|
174
175
|
logError(RainMan.symbolIds, data.symbols_names);
|
|
175
176
|
throw new Error("Check and fix SYMBOL_IDS");
|
|
176
177
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { BetStrategy } from "controllers";
|
|
1
2
|
import { Nullable } from "../../utils";
|
|
2
3
|
/** @ignore */
|
|
3
4
|
export declare const SPEED_PREFIX = "speed-";
|
|
4
5
|
/**
|
|
5
6
|
* Class for managing buttons in games
|
|
6
|
-
*
|
|
7
7
|
* This class includes methods for enabling/disabling buttons in game.
|
|
8
8
|
*
|
|
9
9
|
* The buttons that include each game:
|
|
@@ -14,6 +14,7 @@ export declare const SPEED_PREFIX = "speed-";
|
|
|
14
14
|
* - More Button
|
|
15
15
|
* - Autoplay Button
|
|
16
16
|
* - Volume Button
|
|
17
|
+
* @class ButtonsEventManager
|
|
17
18
|
*/
|
|
18
19
|
export declare class ButtonsEventManager {
|
|
19
20
|
private settingsPlusButton;
|
|
@@ -24,50 +25,71 @@ export declare class ButtonsEventManager {
|
|
|
24
25
|
private settingsSpeedCheetah;
|
|
25
26
|
/**
|
|
26
27
|
* Last layer invoked
|
|
28
|
+
* @private
|
|
27
29
|
* @memberof ButtonsEventManager
|
|
28
30
|
*/
|
|
29
31
|
private lastLayerInvoked;
|
|
30
32
|
/**
|
|
31
33
|
* Speed popup shown at for measuring time of showing speed popup
|
|
34
|
+
* @public
|
|
32
35
|
* @memberof ButtonsEventManager
|
|
33
36
|
*/
|
|
34
37
|
speedPopupShownAt: number;
|
|
35
38
|
/**
|
|
36
39
|
* Function for enabling/disabling buttons in game
|
|
40
|
+
* @private
|
|
37
41
|
* @param {boolean} makeDisabled - flag for enabling/disabling buttons
|
|
38
42
|
* @returns {() => void} function for enabling/disabling buttons
|
|
39
43
|
*/
|
|
40
44
|
private setButtonAvailability;
|
|
45
|
+
/**
|
|
46
|
+
* Function for enabling buttons in the game
|
|
47
|
+
* In some game phases, games need to have buttons enabled.
|
|
48
|
+
* @public
|
|
49
|
+
* @returns {void}
|
|
50
|
+
*/
|
|
41
51
|
enableButtons: () => void;
|
|
52
|
+
/**
|
|
53
|
+
* Function for disabling buttons in the game
|
|
54
|
+
* In some game phases, games need to have buttons disabled.
|
|
55
|
+
* @public
|
|
56
|
+
* @returns {void}
|
|
57
|
+
*/
|
|
42
58
|
disableButtons: () => void;
|
|
43
59
|
constructor();
|
|
44
60
|
/**
|
|
45
61
|
* Method for initializing events in Settings UI
|
|
62
|
+
* This method also change the incentive text based on the selected speed level
|
|
46
63
|
* @public
|
|
64
|
+
* @returns {void}
|
|
47
65
|
*/
|
|
48
66
|
initSettingsEvents(): void;
|
|
49
67
|
/**
|
|
50
68
|
* Method for setting up animated background
|
|
51
69
|
* @public
|
|
70
|
+
* @returns {void}
|
|
52
71
|
*/
|
|
53
72
|
setUpUIElementsInteractivity(): void;
|
|
54
73
|
/**
|
|
55
74
|
* Method for initializing Plus button
|
|
56
75
|
* This method changes bet in game based on given strategy
|
|
57
76
|
* @public
|
|
58
|
-
* @param {(strategy:
|
|
77
|
+
* @param {(strategy: BetStrategy) => void} setBetCallback - callback for setting bet
|
|
78
|
+
* @returns {void}
|
|
59
79
|
*/
|
|
60
|
-
initBetPlusButtonEvent(setBetCallback: (strategy:
|
|
80
|
+
initBetPlusButtonEvent(setBetCallback: (strategy: BetStrategy) => void): void;
|
|
61
81
|
/**
|
|
62
82
|
* Method for initializing Neg button
|
|
63
83
|
* This method changes bet in game based on given strategy
|
|
64
84
|
* @public
|
|
65
|
-
* @param {(strategy:
|
|
85
|
+
* @param {(strategy: BetStrategy) => void} setBetCallback - callback for setting bet
|
|
86
|
+
* @returns {void}
|
|
66
87
|
*/
|
|
67
|
-
initBetMinusButtonEvent(setBetCallback: (strategy:
|
|
88
|
+
initBetMinusButtonEvent(setBetCallback: (strategy: BetStrategy) => void): void;
|
|
68
89
|
/**
|
|
69
90
|
* Method for enabling ability to buy free spins in game
|
|
70
91
|
* @public
|
|
92
|
+
* @returns {void}
|
|
71
93
|
*/
|
|
72
94
|
initFreeSpinModal(): void;
|
|
73
95
|
/**
|
|
@@ -75,21 +97,25 @@ export declare class ButtonsEventManager {
|
|
|
75
97
|
* This method changes texture of Volume button based on volume level
|
|
76
98
|
* If music was muted, it will be resumed
|
|
77
99
|
* @public
|
|
100
|
+
* @returns {void}
|
|
78
101
|
*/
|
|
79
102
|
initVolumeButtonEvent(): void;
|
|
80
103
|
/**
|
|
81
104
|
* Method for initializing button with information about mechanics in game
|
|
82
105
|
* @public
|
|
106
|
+
* @returns {void} - void
|
|
83
107
|
*/
|
|
84
108
|
initInfoButtonEvent(): void;
|
|
85
109
|
/**
|
|
86
110
|
* Method for initializing more button
|
|
87
111
|
* @public
|
|
112
|
+
* @returns {void} - void
|
|
88
113
|
*/
|
|
89
114
|
initMoreButtonEvent(): void;
|
|
90
115
|
/**
|
|
91
116
|
* Method for initializing Autoplay button
|
|
92
117
|
* @public
|
|
118
|
+
* @returns {void} - void
|
|
93
119
|
*/
|
|
94
120
|
initAutoplayButtonEvent(): void;
|
|
95
121
|
/**
|
|
@@ -97,19 +123,29 @@ export declare class ButtonsEventManager {
|
|
|
97
123
|
* @public
|
|
98
124
|
* @param {() => void} onClick - callback for gamble game
|
|
99
125
|
* @param {boolean} disabled - flag for enabling/disabling button
|
|
126
|
+
* @returns {void}
|
|
100
127
|
*/
|
|
101
128
|
initGambleButton(onClick: () => void, disabled: boolean): void;
|
|
129
|
+
/**
|
|
130
|
+
* Initializing take button
|
|
131
|
+
* @public
|
|
132
|
+
* @param {() => void} onClick - callback for take action
|
|
133
|
+
* @param {boolean} disabled - flag for enabling/disabling button
|
|
134
|
+
*/
|
|
135
|
+
initTakeButton(onClick: () => void, disabled: boolean): void;
|
|
102
136
|
/**
|
|
103
137
|
* Function for displaying speed modal
|
|
104
138
|
* This modal is used while doing turbo spin
|
|
105
139
|
* @public
|
|
106
140
|
* @param {("flex" | "none")} displayValue - flag for displaying modal
|
|
141
|
+
* @returns {void}
|
|
107
142
|
*/
|
|
108
143
|
setSpeedPopupVisibility(displayValue: "flex" | "none"): void;
|
|
109
144
|
/**
|
|
110
145
|
* Function for handling autostart conformation
|
|
111
146
|
* @public
|
|
112
147
|
* @param {() => void} confirmAutoplayButtonCallback - callback for confirming autoplay
|
|
148
|
+
* @returns {void}
|
|
113
149
|
*/
|
|
114
150
|
setConfirmAutoplayButton(confirmAutoplayButtonCallback: () => void): void;
|
|
115
151
|
/**
|
|
@@ -129,6 +165,7 @@ export declare class ButtonsEventManager {
|
|
|
129
165
|
* Function for displaying modal layer with given name
|
|
130
166
|
* @private
|
|
131
167
|
* @param {string} layerName - name of layer
|
|
168
|
+
* @returns {void}
|
|
132
169
|
*/
|
|
133
170
|
private handleModalInvocation;
|
|
134
171
|
/**
|