mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-02-25 05:28:27 +00:00
* destroy loading-scene when done - unused event listeners are shut off - children are removed - `loading_bg` will be removed after transition is finished - Added some simple types for `rex` plugins * fix tests * fix pokemonSprite.test.ts on local runs it would include hidden dirs like `.DS_store`. Any files starting with `.` is now excluded * add `mockGameObjectCreator` and use in `gameWrapper` * add battle-scene.test.ts add test to verify that LoadingScene is being removed on `BatleScene.create()` call * update types usage for phaser3-rex-plugins * remove phaser-extensions.d.ts fk you typedoc...
24 lines
590 B
TypeScript
24 lines
590 B
TypeScript
import { vi } from "vitest";
|
|
import MockGraphics from "./mocksContainer/mockGraphics";
|
|
import MockTextureManager from "./mockTextureManager";
|
|
|
|
export class MockGameObjectCreator {
|
|
private readonly textureManager: MockTextureManager;
|
|
|
|
constructor(textureManager: MockTextureManager) {
|
|
console.log("Mocking Phaser.GameObjects.GameObjectCreator;");
|
|
this.textureManager = textureManager;
|
|
}
|
|
|
|
graphics(config: any) {
|
|
return new MockGraphics(this.textureManager, config);
|
|
}
|
|
|
|
rexTransitionImagePack() {
|
|
return {
|
|
transit: vi.fn(),
|
|
once: vi.fn(),
|
|
};
|
|
}
|
|
}
|