Merge branch 'develop' of github.com:thecodingmachine/workadventure into develop
This commit is contained in:
commit
b0faec0459
@ -142,7 +142,7 @@ export abstract class Character extends Container implements OutlineableInterfac
|
|||||||
this.clickable = clickable;
|
this.clickable = clickable;
|
||||||
if (clickable) {
|
if (clickable) {
|
||||||
this.setInteractive({
|
this.setInteractive({
|
||||||
hitArea: new Phaser.Geom.Circle(0, 0, interactiveRadius),
|
hitArea: new Phaser.Geom.Circle(8, 8, interactiveRadius),
|
||||||
hitAreaCallback: Phaser.Geom.Circle.Contains, //eslint-disable-line @typescript-eslint/unbound-method
|
hitAreaCallback: Phaser.Geom.Circle.Contains, //eslint-disable-line @typescript-eslint/unbound-method
|
||||||
useHandCursor: true,
|
useHandCursor: true,
|
||||||
});
|
});
|
||||||
|
@ -38,11 +38,11 @@ export class RemotePlayer extends Character implements ActivatableInterface {
|
|||||||
|
|
||||||
//set data
|
//set data
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
this.visitCardUrl = visitCardUrl;
|
||||||
this.registeredActions = [];
|
this.registeredActions = [];
|
||||||
this.registerDefaultActionsMenuActions();
|
this.registerDefaultActionsMenuActions();
|
||||||
this.setClickable(this.registeredActions.length > 0);
|
this.setClickable(this.registeredActions.length > 0);
|
||||||
this.activationRadius = activationRadius ?? 96;
|
this.activationRadius = activationRadius ?? 96;
|
||||||
this.visitCardUrl = visitCardUrl;
|
|
||||||
this.actionsMenuStoreUnsubscriber = actionsMenuStore.subscribe((value: ActionsMenuData | undefined) => {
|
this.actionsMenuStoreUnsubscriber = actionsMenuStore.subscribe((value: ActionsMenuData | undefined) => {
|
||||||
this.isActionsMenuInitialized = value ? true : false;
|
this.isActionsMenuInitialized = value ? true : false;
|
||||||
});
|
});
|
||||||
@ -118,7 +118,7 @@ export class RemotePlayer extends Character implements ActivatableInterface {
|
|||||||
|
|
||||||
private bindEventHandlers(): void {
|
private bindEventHandlers(): void {
|
||||||
this.on(Phaser.Input.Events.POINTER_DOWN, (event: Phaser.Input.Pointer) => {
|
this.on(Phaser.Input.Events.POINTER_DOWN, (event: Phaser.Input.Pointer) => {
|
||||||
if (event.downElement.nodeName === "CANVAS") {
|
if (event.downElement.nodeName === "CANVAS" && event.leftButtonDown()) {
|
||||||
this.toggleActionsMenu();
|
this.toggleActionsMenu();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user