cleanup
This commit is contained in:
parent
8b8c24f6ef
commit
099d573296
@ -1,9 +1,10 @@
|
|||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { fly } from "svelte/transition";
|
import { fly } from "svelte/transition";
|
||||||
import { ActionsMenuData, actionsMenuStore } from '../../Stores/ActionsMenuStore';
|
import { actionsMenuStore } from '../../Stores/ActionsMenuStore';
|
||||||
import { onDestroy } from "svelte";
|
import { onDestroy } from "svelte";
|
||||||
|
|
||||||
import type { Unsubscriber } from "svelte/store";
|
import type { Unsubscriber } from "svelte/store";
|
||||||
|
import type { ActionsMenuData } from '../../Stores/ActionsMenuStore';
|
||||||
|
|
||||||
let actionsMenuData: ActionsMenuData | undefined;
|
let actionsMenuData: ActionsMenuData | undefined;
|
||||||
|
|
||||||
@ -57,7 +58,8 @@
|
|||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, 0);
|
transform: translate(-50%, 0);
|
||||||
width: 260px !important;
|
width: 260px !important;
|
||||||
max-height: 300px;
|
height: max-content !important;
|
||||||
|
max-height: 40vh;
|
||||||
margin-top: 200px;
|
margin-top: 200px;
|
||||||
|
|
||||||
pointer-events: auto;
|
pointer-events: auto;
|
||||||
@ -66,7 +68,7 @@
|
|||||||
color: whitesmoke;
|
color: whitesmoke;
|
||||||
|
|
||||||
.actions {
|
.actions {
|
||||||
max-height: 200px;
|
max-height: calc(100% - 50px);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display:block;
|
display:block;
|
||||||
overflow-x:hidden;
|
overflow-x:hidden;
|
||||||
|
@ -107,18 +107,6 @@ export class RemotePlayer extends Character implements ActivatableInterface {
|
|||||||
console.log('HELLO');
|
console.log('HELLO');
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
actionName: "Log Goodbye",
|
|
||||||
callback: () => {
|
|
||||||
console.log('GOODBYE');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
actionName: "Clear Goodbye Action",
|
|
||||||
callback: () => {
|
|
||||||
actionsMenuStore.removeAction("Log Goodbye");
|
|
||||||
}
|
|
||||||
},
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,4 +91,4 @@ export class ActivatablesManager {
|
|||||||
MathUtils.distanceBetween(this.currentPlayer.getPosition(), object.getPosition()),
|
MathUtils.distanceBetween(this.currentPlayer.getPosition(), object.getPosition()),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1802,7 +1802,7 @@ ${escapedMessage}
|
|||||||
case "RemovePlayerEvent":
|
case "RemovePlayerEvent":
|
||||||
this.doRemovePlayer(event.userId);
|
this.doRemovePlayer(event.userId);
|
||||||
break;
|
break;
|
||||||
case "UserMovedEvent":
|
case "UserMovedEvent": {
|
||||||
this.doUpdatePlayerPosition(event.event);
|
this.doUpdatePlayerPosition(event.event);
|
||||||
const remotePlayer = this.MapPlayersByKey.get(event.event.userId);
|
const remotePlayer = this.MapPlayersByKey.get(event.event.userId);
|
||||||
if (remotePlayer) {
|
if (remotePlayer) {
|
||||||
@ -1810,6 +1810,7 @@ ${escapedMessage}
|
|||||||
this.activatablesManager.deduceSelectedActivatableObjectByDistance();
|
this.activatablesManager.deduceSelectedActivatableObjectByDistance();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case "GroupCreatedUpdatedEvent":
|
case "GroupCreatedUpdatedEvent":
|
||||||
this.doShareGroupPosition(event.event);
|
this.doShareGroupPosition(event.event);
|
||||||
break;
|
break;
|
||||||
|
@ -8,4 +8,4 @@ export interface OutlineableInterface {
|
|||||||
pointerOutOutline(): void
|
pointerOutOutline(): void
|
||||||
characterCloseByOutline(): void
|
characterCloseByOutline(): void
|
||||||
characterFarAwayOutline(): void
|
characterFarAwayOutline(): void
|
||||||
}
|
}
|
||||||
|
@ -42,4 +42,4 @@ function createActionsMenuStore() {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export const actionsMenuStore = createActionsMenuStore();
|
export const actionsMenuStore = createActionsMenuStore();
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import type { OutlineableInterface } from '../Phaser/Game/OutlineableInterface';
|
import type { OutlineableInterface } from '../Phaser/Game/OutlineableInterface';
|
||||||
|
|
||||||
export function isOutlineable(object: unknown): object is OutlineableInterface {
|
export function isOutlineable(object: unknown): object is OutlineableInterface {
|
||||||
return (object as unknown as OutlineableInterface)?.getObjectToOutline() !== undefined;
|
return (object as OutlineableInterface)?.pointerOverOutline !== undefined;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user