mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-25 08:49:32 +02:00
add: MockText.on()
This commit is contained in:
parent
b4c6f5f240
commit
e94e41111b
@ -79,7 +79,14 @@ export default class MockText implements MockGameObject {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
showText(text: string, delay?: integer | null, callback?: Function | null, callbackDelay?: integer | null, prompt?: boolean | null, promptDelay?: integer | null) {
|
showText(
|
||||||
|
text: string,
|
||||||
|
delay?: integer | null,
|
||||||
|
callback?: Function | null,
|
||||||
|
callbackDelay?: integer | null,
|
||||||
|
prompt?: boolean | null,
|
||||||
|
promptDelay?: integer | null
|
||||||
|
) {
|
||||||
this.scene.messageWrapper.showText(text, delay, callback, callbackDelay, prompt, promptDelay);
|
this.scene.messageWrapper.showText(text, delay, callback, callbackDelay, prompt, promptDelay);
|
||||||
if (callback) {
|
if (callback) {
|
||||||
callback();
|
callback();
|
||||||
@ -115,16 +122,11 @@ export default class MockText implements MockGameObject {
|
|||||||
// return this.phaserText.once(event, callback, source);
|
// return this.phaserText.once(event, callback, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
off(event, callback, obj) {
|
off(event, callback, obj) {}
|
||||||
}
|
|
||||||
|
|
||||||
removedFromScene() {
|
removedFromScene() {}
|
||||||
|
|
||||||
}
|
addToDisplayList() {}
|
||||||
|
|
||||||
addToDisplayList() {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
setStroke(color, thickness) {
|
setStroke(color, thickness) {
|
||||||
// Sets the stroke color and thickness.
|
// Sets the stroke color and thickness.
|
||||||
@ -160,7 +162,7 @@ export default class MockText implements MockGameObject {
|
|||||||
* @param z The z position of this Game Object. Default 0.
|
* @param z The z position of this Game Object. Default 0.
|
||||||
* @param w The w position of this Game Object. Default 0.
|
* @param w The w position of this Game Object. Default 0.
|
||||||
*/
|
*/
|
||||||
setPosition(x?: number, y?: number, z?: number, w?: number) { }
|
setPosition(x?: number, y?: number, z?: number, w?: number) {}
|
||||||
|
|
||||||
setText(text) {
|
setText(text) {
|
||||||
// Sets the text this Game Object will display.
|
// Sets the text this Game Object will display.
|
||||||
@ -298,4 +300,6 @@ export default class MockText implements MockGameObject {
|
|||||||
getAll() {
|
getAll() {
|
||||||
return this.list;
|
return this.list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
on(_event: string | symbol, _fn: Function, _context?: any) {}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user