2021-12-16 10:04:55 +01:00
|
|
|
//import Phaser from "phaser";
|
|
|
|
|
2021-09-06 14:27:54 +02:00
|
|
|
declare module "phaser3-rex-plugins/plugins/virtualjoystick.js" {
|
2021-12-16 10:04:55 +01:00
|
|
|
/*const content: any; // eslint-disable-line
|
|
|
|
export default content;*/
|
|
|
|
import GameObject = Phaser.GameObjects.GameObject;
|
|
|
|
import { Scene } from "phaser";
|
|
|
|
|
|
|
|
type CursorKey = {
|
|
|
|
isDown: boolean;
|
|
|
|
};
|
|
|
|
|
|
|
|
export type Direction = "left" | "right" | "up" | "down";
|
|
|
|
|
|
|
|
interface CursorKeys extends Record<Direction, CursorKey> {
|
|
|
|
left: CursorKey;
|
|
|
|
right: CursorKey;
|
|
|
|
up: CursorKey;
|
|
|
|
down: CursorKey;
|
|
|
|
}
|
|
|
|
|
|
|
|
class VirtualJoystick extends GameObject {
|
|
|
|
constructor(scene: Scene, config: unknown);
|
|
|
|
enable: boolean;
|
|
|
|
base: GameObjects.Image;
|
|
|
|
thumb: GameObjects.Image;
|
|
|
|
setRadius: (radius: number) => void;
|
|
|
|
y: number;
|
|
|
|
x: number;
|
|
|
|
forceX: number;
|
|
|
|
forceY: number;
|
|
|
|
visible: boolean;
|
|
|
|
createCursorKeys: () => CursorKeys;
|
|
|
|
}
|
|
|
|
|
|
|
|
export default VirtualJoystick;
|
2021-04-14 17:47:26 +02:00
|
|
|
}
|
2021-09-06 14:27:54 +02:00
|
|
|
declare module "phaser3-rex-plugins/plugins/gestures-plugin.js" {
|
2021-05-05 12:15:13 +02:00
|
|
|
const content: any; // eslint-disable-line
|
2021-04-14 17:47:26 +02:00
|
|
|
export default content;
|
|
|
|
}
|
2021-09-06 14:27:54 +02:00
|
|
|
declare module "phaser3-rex-plugins/plugins/webfontloader-plugin.js" {
|
2021-05-26 17:07:07 +02:00
|
|
|
const content: any; // eslint-disable-line
|
|
|
|
export default content;
|
|
|
|
}
|
2021-09-06 14:27:54 +02:00
|
|
|
declare module "phaser3-rex-plugins/plugins/outlinepipeline-plugin.js" {
|
2021-06-22 16:35:57 +02:00
|
|
|
import GameObject = Phaser.GameObjects.GameObject;
|
|
|
|
|
|
|
|
class OutlinePipelinePlugin {
|
|
|
|
add(gameObject: GameObject, config: object);
|
|
|
|
|
|
|
|
remove(gameObject: GameObject, name?: string);
|
|
|
|
}
|
|
|
|
|
|
|
|
export default OutlinePipelinePlugin;
|
|
|
|
}
|
2021-09-06 14:27:54 +02:00
|
|
|
declare module "phaser3-rex-plugins/plugins/gestures.js" {
|
2021-04-16 18:49:04 +02:00
|
|
|
export const Pinch: any; // eslint-disable-line
|
2021-05-05 12:15:13 +02:00
|
|
|
}
|