vertecs
Version:
A typescript entity-component-system framework
71 lines (54 loc) • 1.68 kB
text/typescript
import { ComponentClass } from "../../../src/core/Component";
import { Entity } from "../../../src/core";
import { ClientNetworkSystem } from "../../../src";
export default class TestClientNetworkSystem extends ClientNetworkSystem {
public constructor(
allowedNetworkComponents: ComponentClass[],
address: string
) {
super(allowedNetworkComponents, address);
this.
this.
}
protected onConnect(): void {
this.
}
protected onDisconnect(): void {
this.
}
protected onCustomData(customPrivateData: any) {
this.
}
protected onNewEntity(entity: Entity): void {
this.
}
protected onDeletedEntity(entity: Entity): void {
this.
(newEntity) => newEntity.id !== entity.id
);
}
public get lastCustomData(): any {
return this.
}
public get isConnected(): boolean {
return this.
}
public set isConnected(value: boolean) {
this.
}
public get entities(): Entity[] {
return this.
}
public set entities(value: Entity[]) {
this.
}
public get serverSnapshot(): any {
return this.$serverSnapshot;
}
public set serverSnapshot(value: any) {
this.$serverSnapshot = value;
}
}