Improved movement logic

This commit is contained in:
2025-02-16 17:14:24 +01:00
parent 920baaebde
commit 15dc331a43
2 changed files with 83 additions and 44 deletions

View File

@ -62,8 +62,8 @@ export function createTileArray(width: number, height: number, tile: string = 'b
return Array.from({ length: height }, () => Array.from({ length: width }, () => tile))
}
export const calculateIsometricDepth = (positionX: number, positionY: number, pivotPoints: { x: number; y: number; }[] = []) => {
return Math.max(positionX + positionY);
export const calculateIsometricDepth = (positionX: number, positionY: number, pivotPoints: { x: number; y: number }[] = []) => {
return Math.max(positionX + positionY)
}
async function loadTileTextures(tiles: TileT[], scene: Phaser.Scene) {