Factor out AnimatableTile{Factory}
This commit is contained in:
11
ts/animatable_tile_factory.ts
Normal file
11
ts/animatable_tile_factory.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { TileFactory } from './tile_factory.js';
|
||||
|
||||
export abstract class AnimatableTileFactory extends TileFactory {
|
||||
animations: Map<string, [Keyframe[], object]> = new Map();
|
||||
|
||||
add_animation(name: string, keyframes: Keyframe[], options: object) {
|
||||
this.animations.set(name, [keyframes, options]);
|
||||
}
|
||||
|
||||
abstract copy(): AnimatableTileFactory;
|
||||
}
|
||||
Reference in New Issue
Block a user