pixi-rainman-game-engine 0.2.5 → 0.2.7
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Container, Rectangle, Sprite } from "pixi.js";
|
|
2
2
|
import { Spine } from "pixi-spine";
|
|
3
|
-
import { defaultSpeedConfig, SoundManager, SoundTracks } from "../../application";
|
|
3
|
+
import { animationsSpeedLevels, defaultSpeedConfig, SoundManager, SoundTracks } from "../../application";
|
|
4
4
|
import { AnimationLayer } from "../../layers";
|
|
5
5
|
import { RainMan } from "../../Rainman";
|
|
6
6
|
import { getSpineData, getTexture, togglePaytable } from "../../utils";
|
|
@@ -61,7 +61,20 @@ export class AbstractSymbolBase extends Container {
|
|
|
61
61
|
return new Promise((resolve) => {
|
|
62
62
|
this.spine = new Spine(getSpineData(specialResourceName));
|
|
63
63
|
this.endOfSwapAnimationPromise = resolve;
|
|
64
|
-
|
|
64
|
+
switch (this.animationSpeedMultiplier) {
|
|
65
|
+
case animationsSpeedLevels.slow: {
|
|
66
|
+
this.spine.state.timeScale = animationsSpeedLevels.normal;
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case animationsSpeedLevels.normal: {
|
|
70
|
+
this.spine.state.timeScale = animationsSpeedLevels.normal + 0.15;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case animationsSpeedLevels.fast: {
|
|
74
|
+
this.spine.state.timeScale = this.animationSpeedMultiplier;
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
65
78
|
this.spine.state.setAnimation(0, animationName, false);
|
|
66
79
|
this.spine.scale.set(spineScale);
|
|
67
80
|
this.addChild(this.spine);
|
|
@@ -154,10 +154,12 @@ export class AbstractController {
|
|
|
154
154
|
this.buttonsEventManager.initInfoButtonEvent();
|
|
155
155
|
this.buttonsEventManager.initMoreButtonEvent();
|
|
156
156
|
this.buttonsEventManager.initAutoplayButtonEvent();
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
if (RainMan.componentRegistry.has(BUTTONS.gamble)) {
|
|
158
|
+
this.buttonsEventManager.initGambleButton(() => {
|
|
159
|
+
RainMan.settingsStore.gambleGameUsed = true;
|
|
160
|
+
this.mainContainer.invokeGambleGame();
|
|
161
|
+
}, this.lastWinAmount === 0);
|
|
162
|
+
}
|
|
161
163
|
RainMan.componentRegistry.get(SpeedControlButton.registryName).setOnClick(() => {
|
|
162
164
|
this.quickStopController.speedPopupDisabled = true;
|
|
163
165
|
RainMan.componentRegistry.nextSpeedLevel();
|