add companion only on local player

This commit is contained in:
Johannes Berthel 2021-04-02 17:14:34 +02:00
parent 5a91e15580
commit 2ad712807b
3 changed files with 53 additions and 28 deletions

View file

@ -69,11 +69,9 @@ export abstract class Character extends Container {
this.setDepth(-1);
this.playAnimation(direction, moving);
this.addCompanion();
}
private addCompanion(): void {
public addCompanion(): void {
this.companion = new Companion(this.scene, this.x, this.y);
}