added isActivatable() method to implement through interface

This commit is contained in:
Hanusiak Piotr
2022-01-31 13:00:14 +01:00
parent 2322f5f76d
commit 989897cb01
8 changed files with 32 additions and 247 deletions
+11
View File
@@ -61,6 +61,13 @@ export class RemotePlayer extends Character implements ActivatableInterface {
});
this.bindEventHandlers();
this.registerActionsMenuAction({
actionName: "ddd",
callback: () => {
console.log('ddd');
},
});
}
public updatePosition(position: PointInterface): void {
@@ -98,6 +105,10 @@ export class RemotePlayer extends Character implements ActivatableInterface {
super.destroy();
}
public isActivatable(): boolean {
return this.isClickable();
}
private updateIsClickable(): void {
this.setClickable(this.registeredActions.length > 0);
}