This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Entity = number | |
abstract class Component { } | |
abstract class System { | |
public abstract componentsRequired: Set<Function> | |
public abstract update(entities: Set<Entity>): void | |
public ecs: ECS | |
} | |
type ComponentClass<T extends Component> = new (...args: any[]) => T | |
class ComponentContainer { | |
private map = new Map<Function, Component>(); |