mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-07-05 16:02:20 +02:00
Fixup setSizeToFrame mock
This commit is contained in:
parent
4922f8cb62
commit
bcfe629db5
@ -1,6 +1,5 @@
|
|||||||
import Phaser from "phaser";
|
import Phaser from "phaser";
|
||||||
import type { MockGameObject } from "../mockGameObject";
|
import type { MockGameObject } from "../mockGameObject";
|
||||||
import Sprite = Phaser.GameObjects.Sprite;
|
|
||||||
import Frame = Phaser.Textures.Frame;
|
import Frame = Phaser.Textures.Frame;
|
||||||
|
|
||||||
export default class MockSprite implements MockGameObject {
|
export default class MockSprite implements MockGameObject {
|
||||||
@ -21,6 +20,7 @@ export default class MockSprite implements MockGameObject {
|
|||||||
Phaser.GameObjects.Sprite.prototype.setInteractive = this.setInteractive;
|
Phaser.GameObjects.Sprite.prototype.setInteractive = this.setInteractive;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
Phaser.GameObjects.Sprite.prototype.setTexture = this.setTexture;
|
Phaser.GameObjects.Sprite.prototype.setTexture = this.setTexture;
|
||||||
|
// @ts-ignore
|
||||||
Phaser.GameObjects.Sprite.prototype.setSizeToFrame = this.setSizeToFrame;
|
Phaser.GameObjects.Sprite.prototype.setSizeToFrame = this.setSizeToFrame;
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
Phaser.GameObjects.Sprite.prototype.setFrame = this.setFrame;
|
Phaser.GameObjects.Sprite.prototype.setFrame = this.setFrame;
|
||||||
@ -42,8 +42,8 @@ export default class MockSprite implements MockGameObject {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
setSizeToFrame(_frame?: boolean | Frame): Sprite {
|
setSizeToFrame(_frame?: boolean | Frame): this {
|
||||||
return {} as Sprite;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
setPipeline(obj): this {
|
setPipeline(obj): this {
|
||||||
@ -62,12 +62,12 @@ export default class MockSprite implements MockGameObject {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
setScale(scale): this {
|
setScale(scale = 1): this {
|
||||||
this.phaserSprite.setScale(scale);
|
this.phaserSprite.setScale(scale);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
setOrigin(x, y): this {
|
setOrigin(x = 0.5, y = x): this {
|
||||||
this.phaserSprite.setOrigin(x, y);
|
this.phaserSprite.setOrigin(x, y);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user