added isActivatable() method to implement through interface
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user