chat bubble above game tiles (#2129)
Co-authored-by: Piotr 'pwh' Hanusiak <p.hanusiak@workadventu.re>
This commit is contained in:
parent
76bf7b9c74
commit
f46d7d57f3
@ -4,5 +4,6 @@ export const DEPTH_TILE_INDEX = 0;
|
||||
//Note: Player characters use their y coordinate as their depth to simulate a perspective.
|
||||
//See the Character class.
|
||||
export const DEPTH_OVERLAY_INDEX = 10000;
|
||||
export const DEPTH_BUBBLE_CHAT_SPRITE = 99999;
|
||||
export const DEPTH_INGAME_TEXT_INDEX = 100000;
|
||||
export const DEPTH_UI_INDEX = 1000000;
|
||||
|
@ -101,6 +101,7 @@ import type { CoWebsite } from "../../WebRtc/CoWebsite/CoWesbite";
|
||||
import CancelablePromise from "cancelable-promise";
|
||||
import { Deferred } from "ts-deferred";
|
||||
import { SuperLoaderPlugin } from "../Services/SuperLoaderPlugin";
|
||||
import { DEPTH_BUBBLE_CHAT_SPRITE } from "./DepthIndexes";
|
||||
import { ErrorScreenMessage, PlayerDetailsUpdatedMessage } from "../../Messages/ts-proto-generated/protos/messages";
|
||||
import { uiWebsiteManager } from "./UI/UIWebsiteManager";
|
||||
export interface GameSceneInitInterface {
|
||||
@ -1216,7 +1217,7 @@ ${escapedMessage}
|
||||
this.CurrentPlayer.y,
|
||||
"circleSprite-white"
|
||||
);
|
||||
scriptedBubbleSprite.setDisplayOrigin(48, 48);
|
||||
scriptedBubbleSprite.setDisplayOrigin(48, 48).setDepth(DEPTH_BUBBLE_CHAT_SPRITE);
|
||||
this.add.existing(scriptedBubbleSprite);
|
||||
})
|
||||
);
|
||||
@ -2079,7 +2080,7 @@ ${escapedMessage}
|
||||
? "circleSprite-red"
|
||||
: "circleSprite-white"
|
||||
);
|
||||
sprite.setDisplayOrigin(48, 48);
|
||||
sprite.setDisplayOrigin(48, 48).setDepth(DEPTH_BUBBLE_CHAT_SPRITE);
|
||||
this.add.existing(sprite);
|
||||
this.groups.set(groupPositionMessage.groupId, sprite);
|
||||
if (this.currentPlayerGroupId === groupPositionMessage.groupId) {
|
||||
|
Loading…
Reference in New Issue
Block a user