Skip to content
This repository has been archived by the owner on Aug 4, 2024. It is now read-only.

Commit

Permalink
Revert: New version of Phaser upgrading - commit: ab91440
Browse files Browse the repository at this point in the history
  • Loading branch information
gparant committed Feb 27, 2024
1 parent 19d8646 commit 62d2ed1
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 109 deletions.
198 changes: 94 additions & 104 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion play/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
"openapi3-ts": "^3.0.2",
"openid-client": "^5.1.10",
"p-limit": "^4.0.0",
"phaser": "3.80",
"phaser": "3.60.0",
"phaser-animated-tiles": "workadventure/phaser-animated-tiles#7e02ce91a100338a27f75f7b443bacd12459fd0f",
"phaser3-rex-plugins": "^1.1.42",
"posthog-js": "^1.14.1",
Expand Down
8 changes: 4 additions & 4 deletions play/src/front/Phaser/Game/UI/OutlineManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import { DirtyScene } from "../DirtyScene";
export class OutlineManager {
private scene: DirtyScene;
private gameObjects: Map<Phaser.GameObjects.GameObject, () => { thickness: number; color?: number }>;
//private readonly scaleManagerResizeCallback: () => void;
private readonly scaleManagerResizeCallback: () => void;

constructor(scene: DirtyScene) {
this.scene = scene;
this.gameObjects = new Map<Phaser.GameObjects.GameObject, () => { thickness: number; color?: number }>();

/*this.scaleManagerResizeCallback = () => {
this.scaleManagerResizeCallback = () => {
for (const [gameObject, getOutline] of this.gameObjects) {
this.getOutlinePlugin()?.remove(gameObject);
const outline = getOutline();
Expand All @@ -30,11 +30,11 @@ export class OutlineManager {
this.scene.markDirty();
};

this.scene.scale.on(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback);*/
this.scene.scale.on(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback);
}

public clear(): void {
//this.scene.scale.off(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback);
this.scene.scale.off(Phaser.Scale.Events.RESIZE, this.scaleManagerResizeCallback);
this.gameObjects.clear();
}

Expand Down

0 comments on commit 62d2ed1

Please sign in to comment.