Start refactoring
This commit is contained in:
parent
6fc53ee51e
commit
9b47d56d8f
39 changed files with 423 additions and 234 deletions
|
|
@ -1,8 +1,12 @@
|
|||
import { IRenderer } from '../../drawing/i-renderer';
|
||||
import { Command } from '../command';
|
||||
import { IRenderer } from '../../drawing/rendering/i-renderer';
|
||||
|
||||
export class BeforeRenderCommand extends Command {
|
||||
public constructor(public readonly renderer?: IRenderer) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'BeforeRenderCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ export class CursorMoveCommand extends Command {
|
|||
public constructor(public readonly position?: vec2) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'CursorMoveCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,8 +1,12 @@
|
|||
import { IRenderer } from '../../drawing/i-renderer';
|
||||
import { Command } from '../command';
|
||||
import { IRenderer } from '../../drawing/rendering/i-renderer';
|
||||
|
||||
export class RenderCommand extends Command {
|
||||
public constructor(public readonly renderer?: IRenderer) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'RenderCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,8 @@ export class KeyDownCommand extends Command {
|
|||
public constructor(public readonly key?: string) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'KeyDownCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,8 @@ export class KeyUpCommand extends Command {
|
|||
public constructor(public readonly key?: string) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'KeyUpCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ export class MoveToCommand extends Command {
|
|||
public constructor(public readonly position?: vec2) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'MoveToCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ export class PrimaryActionCommand extends Command {
|
|||
public constructor(public readonly position?: vec2) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'PrimaryActionCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ export class SecondaryActionCommand extends Command {
|
|||
public constructor(public readonly position?: vec2) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'SecondaryActionCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,4 +6,8 @@ export class StepCommand extends Command {
|
|||
) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'StepCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,4 +5,8 @@ export class SwipeCommand extends Command {
|
|||
public constructor(public readonly delta?: vec2) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'SwipeCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,4 +4,8 @@ export class ZoomCommand extends Command {
|
|||
public constructor(public readonly factor?: number) {
|
||||
super();
|
||||
}
|
||||
|
||||
public get type(): string {
|
||||
return 'ZoomCommand';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue