1 | import type { Rect2, Vector2 } from "./types";
|
2 | export type CommandLifeCycle = "command_start" | "command_finish";
|
3 | export type CommandOptions = {
|
4 | preDelay?: number;
|
5 | postDelay?: number;
|
6 | };
|
7 | export declare abstract class CommandBase {
|
8 | static commandCount: number;
|
9 | readonly id: string;
|
10 | readonly preDelay: number;
|
11 | readonly postDelay: number;
|
12 | constructor(options?: CommandOptions);
|
13 | abstract getCommandArgs(resolutionRatio: Vector2): string[];
|
14 | }
|
15 | export declare class TapCommand extends CommandBase {
|
16 | readonly targetPos: Vector2;
|
17 | constructor(options: {
|
18 | rect: Rect2;
|
19 | } & CommandOptions);
|
20 | getCommandArgs(resolutionRatio: Vector2): string[];
|
21 | }
|
22 | export declare class SwipeCommand extends CommandBase {
|
23 | readonly originPos: Vector2;
|
24 | readonly targetPos: Vector2;
|
25 | readonly duration: number;
|
26 | constructor(options: {
|
27 | originRect: Rect2;
|
28 | targetRect: Rect2;
|
29 | duration?: number;
|
30 | } & CommandOptions);
|
31 | getCommandArgs(resolutionRatio: Vector2): string[];
|
32 | }
|
33 | export declare class keyEventCommand extends CommandBase {
|
34 | readonly keyCode: number;
|
35 | constructor(options: {
|
36 | keyCode: number;
|
37 | } & CommandOptions);
|
38 | getCommandArgs(): string[];
|
39 | }
|
40 | export declare class TextCommand extends CommandBase {
|
41 | readonly content: string;
|
42 | constructor(options: {
|
43 | content: string;
|
44 | } & CommandOptions);
|
45 | getCommandArgs(): string[];
|
46 | }
|