decla-red/shared/src/objects/game-object.ts
2020-10-05 19:07:17 +02:00

12 lines
305 B
TypeScript

import { CommandReceiver } from '../commands/command-receiver';
import { Id } from '../transport/identity';
export abstract class GameObject extends CommandReceiver {
public get type(): string {
return (this as any).constructor.type;
}
constructor(public readonly id: Id) {
super();
}
}