Archived
Private
Public Access
1
0

Initial commit

This commit is contained in:
2022-09-04 12:45:01 +02:00
commit f4a01d6a69
11601 changed files with 4206660 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
namespace TSE {
export abstract class BaseComponent {
public name: string;
protected _owner: SimObject;
protected _data: IComponentData;
public constructor(data: IComponentData) {
this._data = data;
this.name = data.name;
}
public get owner(): SimObject { return this._owner; }
public set owner(value: SimObject) { this._owner = value; }
public load(): void { }
public update(time: number): void { }
public render(shader: Shader): void { }
}
export interface IComponentData {
name: string;
setFromJson(json: any): void;
}
export interface IComponentBuilder {
get type(): string;
buildFromJson(json: any): BaseComponent;
}
}