Tower class hierarchy

This commit is contained in:
Ian Gulliver
2021-05-11 02:57:17 +00:00
parent 495aeb6204
commit 0ff24fe806
28 changed files with 346 additions and 279 deletions

15
ts/simple_tile.ts Normal file
View File

@@ -0,0 +1,15 @@
import { Tile } from './tile.js';
export class SimpleTile extends Tile {
animations: Map<string, [Keyframe[], object]>;
constructor(width: number, height: number, image_url: string, animations: Map<string, [Keyframe[], object]>) {
super(width, height);
this.elem.style.backgroundImage = `url('${encodeURIComponent(image_url)}')`;
this.elem.style.backgroundSize = 'cover';
this.animations = animations;
}
}