mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-28 04:22:44 +02:00
Fix tween chain mock
This commit is contained in:
parent
df361accd7
commit
4934a9e357
@ -124,13 +124,17 @@ export default class GameWrapper {
|
|||||||
|
|
||||||
this.scene.tweens = {
|
this.scene.tweens = {
|
||||||
add: data => {
|
add: data => {
|
||||||
if (data.onComplete) {
|
// TODO: our mock of `add` should have the same signature as the real one, which returns the tween
|
||||||
data.onComplete();
|
data.onComplete?.();
|
||||||
}
|
|
||||||
},
|
},
|
||||||
getTweensOf: () => [],
|
getTweensOf: () => [],
|
||||||
killTweensOf: () => [],
|
killTweensOf: () => [],
|
||||||
chain: () => null,
|
|
||||||
|
chain: data => {
|
||||||
|
// TODO: our mock of `chain` should have the same signature as the real one, which returns the chain
|
||||||
|
data?.tweens?.forEach(tween => tween.onComplete?.());
|
||||||
|
data.onComplete?.();
|
||||||
|
},
|
||||||
addCounter: data => {
|
addCounter: data => {
|
||||||
if (data.onComplete) {
|
if (data.onComplete) {
|
||||||
data.onComplete();
|
data.onComplete();
|
||||||
|
Loading…
Reference in New Issue
Block a user