From b3950330e3351437f153c6c1debb3821d6e28864 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sat, 8 Dec 2018 12:39:18 +0100 Subject: Create Electron app --- src/model/data/entity.ts | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 src/model/data/entity.ts (limited to 'src/model/data/entity.ts') diff --git a/src/model/data/entity.ts b/src/model/data/entity.ts deleted file mode 100644 index f52c130..0000000 --- a/src/model/data/entity.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Collision } from './collision'; - -export interface EntityAnimation { - readonly sequence: ReadonlyArray<[number, number]>; -} - -export interface EntityDataInput { - readonly sprite: string; - readonly anchor?: [number, number]; - readonly collision?: Collision[]; - readonly frames?: number; - readonly animation?: EntityAnimation; -} - -export class EntityData { - public readonly sprite: string; - public readonly anchor: [number, number]; - public readonly collision: Collision[]; - public readonly frames: number; - public readonly animation?: EntityAnimation; - - constructor(input: EntityDataInput) { - this.sprite = input.sprite; - this.anchor = input.anchor || [0.5, 0.5]; - this.collision = input.collision || []; - this.frames = input.frames || 1; - this.animation = input.animation; - } -} -- cgit v1.2.3