diff --git a/src/engine/EntityComponentSystem/Entity.ts b/src/engine/EntityComponentSystem/Entity.ts index 1acfc1326..5b6f591f8 100644 --- a/src/engine/EntityComponentSystem/Entity.ts +++ b/src/engine/EntityComponentSystem/Entity.ts @@ -181,9 +181,10 @@ export class Entity implements OnIniti * Adds a tag to an entity * @param tag */ - public addTag(tag: string) { + public addTag(tag: string): Entity { this._tags.add(tag); this.tagAdded$.notifyAll(tag); + return this; } /** @@ -192,9 +193,10 @@ export class Entity implements OnIniti * Removals are deferred until the end of update * @param tag */ - public removeTag(tag: string) { + public removeTag(tag: string): Entity { this._tags.delete(tag); this.tagRemoved$.notifyAll(tag); + return this; } /**