stanje 4am

This commit is contained in:
2025-12-07 04:19:57 +01:00
parent 521468c797
commit 03a9cd46a2
20 changed files with 619 additions and 168 deletions

View File

@@ -21,8 +21,12 @@ class IsometricUtils {
}
// Izračun depth (z-index) za pravilno sortiranje
// Izračun depth (z-index)
// V Phaserju je najbolje uporabiti kar Y koordinato spritha.
// Tu vrnemo pričakovano Y pozicijo za grid celico.
getDepth(gridX, gridY) {
return gridX + gridY;
// (gridX + gridY) * tileHeight/2 je točno screenY
return (gridX + gridY) * (this.tileHeight / 2);
}
// Izračun centerja tile-a