You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
802 B
39 lines
802 B
import { BasicSerializableObject } from "../savegame/serialization";
|
|
|
|
export class Component extends BasicSerializableObject {
|
|
/**
|
|
* Returns the components unique id
|
|
* @returns {string}
|
|
*/
|
|
static getId() {
|
|
abstract;
|
|
return "unknown-component";
|
|
}
|
|
|
|
/**
|
|
* Should return the schema used for serialization
|
|
*/
|
|
static getSchema() {
|
|
return {};
|
|
}
|
|
|
|
/* dev:start */
|
|
|
|
/**
|
|
* Fixes typeof DerivedComponent is not assignable to typeof Component, compiled out
|
|
* in non-dev builds
|
|
*/
|
|
constructor(...args) {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* Returns a string representing the components data, only in dev builds
|
|
* @returns {string}
|
|
*/
|
|
getDebugString() {
|
|
return null;
|
|
}
|
|
/* dev:end */
|
|
}
|