fighting with not cripsy pixels when resizing
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { MathUtils } from "../../../Utils/MathUtils";
|
||||
import { getPlayerAnimations, PlayerAnimationDirections, PlayerAnimationTypes } from "../../Player/Animation";
|
||||
|
||||
export enum CustomWokaBodyPart {
|
||||
@@ -73,6 +74,11 @@ export class CustomWokaPreviewer extends Phaser.GameObjects.Container {
|
||||
this.animate();
|
||||
}
|
||||
|
||||
public setDisplaySize(width: number, height: number): this {
|
||||
const [newWidth, newHeight] = MathUtils.getWholePixelsNewSize(this.SIZE, this.SIZE, width, height);
|
||||
return super.setDisplaySize(newWidth, newHeight);
|
||||
}
|
||||
|
||||
public changeAnimation(direction: PlayerAnimationDirections, moving: boolean): void {
|
||||
this.animationDirection = direction;
|
||||
this.moving = moving;
|
||||
|
||||
Reference in New Issue
Block a user