pixi-rainman-game-engine 0.3.44 → 0.3.45
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.
|
@@ -50,7 +50,7 @@ export class MiddleButtons extends ResponsiveContainer {
|
|
|
50
50
|
this.refreshButton.anchor.set(0.5, 0.5);
|
|
51
51
|
this.autoplayButton.anchor.set(0.5, -1);
|
|
52
52
|
this.takeButton.anchor.set(0.5, 2);
|
|
53
|
-
this.gambleButton.anchor.set(0.5, -1);
|
|
53
|
+
this.gambleButton.anchor.set(0.5, -1.22);
|
|
54
54
|
}
|
|
55
55
|
else {
|
|
56
56
|
this.autoplayButton.anchor.set(2, 0.5);
|
|
@@ -68,6 +68,7 @@ export class UpdatableValueComponent extends Container {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
async update(newValue, time = RainMan.config.durationOfActions.updatableTextCountingDuration) {
|
|
71
|
+
this.tween?.stop();
|
|
71
72
|
this.finalValue = newValue;
|
|
72
73
|
Ticker.shared.remove(this.animateTick);
|
|
73
74
|
Ticker.shared.add(this.animateTick);
|
|
@@ -80,6 +81,7 @@ export class UpdatableValueComponent extends Container {
|
|
|
80
81
|
* @returns {Promise<void>} A promise that resolves when the update is complete.
|
|
81
82
|
*/
|
|
82
83
|
async loseUpdate(time = RainMan.config.durationOfActions.updatableTextCountingDuration) {
|
|
84
|
+
this.tween?.stop();
|
|
83
85
|
Ticker.shared.remove(this.animateTick);
|
|
84
86
|
Ticker.shared.add(this.animateTick);
|
|
85
87
|
await this.initAnimation(0, time / this.countingDivider, true);
|
|
@@ -170,35 +170,33 @@ export class AbstractController {
|
|
|
170
170
|
*/
|
|
171
171
|
setupSpaceOrEnterListener() {
|
|
172
172
|
window.addEventListener("keydown", (keyboardEvent) => {
|
|
173
|
-
if (keyboardEvent.code
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
this.handleSpinLogic();
|
|
173
|
+
if (keyboardEvent.code !== "Space" && keyboardEvent.code !== "Enter") {
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
keyboardEvent.preventDefault();
|
|
177
|
+
if (this.buttonHeldSince === 0) {
|
|
178
|
+
this.buttonHeldSince = Date.now();
|
|
179
|
+
}
|
|
180
|
+
const buttonHold = Date.now() - this.buttonHeldSince;
|
|
181
|
+
if (buttonHold >= 500) {
|
|
182
|
+
this.columnsContainer.enableQuickReelsStop();
|
|
183
|
+
}
|
|
184
|
+
if (RainMan.settingsStore.isGambleGameActive || RainMan.settingsStore.isSpeedModalShown) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (RainMan.settingsStore.disableKeyboardShortcuts) {
|
|
188
|
+
return;
|
|
190
189
|
}
|
|
190
|
+
this.handleDisablingButtons(true);
|
|
191
|
+
this.handleSpinLogic();
|
|
191
192
|
});
|
|
192
193
|
window.addEventListener("keyup", (keyboardEvent) => {
|
|
193
|
-
if (keyboardEvent.code
|
|
194
|
-
|
|
195
|
-
this.buttonHeldSince = 0;
|
|
196
|
-
this.columnsContainer.clearQuickReelsStop();
|
|
197
|
-
if (this.gamePhase === gamePhases.HANDLING_ACTIONS ||
|
|
198
|
-
this.gamePhase === gamePhases.STOPPING_HANDLING_ACTIONS) {
|
|
199
|
-
this.shouldPlayNextSpin = false;
|
|
200
|
-
}
|
|
194
|
+
if (keyboardEvent.code !== "Space" && keyboardEvent.code !== "Enter") {
|
|
195
|
+
return;
|
|
201
196
|
}
|
|
197
|
+
keyboardEvent.preventDefault();
|
|
198
|
+
this.buttonHeldSince = 0;
|
|
199
|
+
this.columnsContainer.clearQuickReelsStop();
|
|
202
200
|
});
|
|
203
201
|
window.addEventListener("blur", () => {
|
|
204
202
|
this.buttonHeldSince = 0;
|
package/package.json
CHANGED