Skip to content

Commit bc91eaf

Browse files
committed
fix: character3 not standing at the center
1 parent 66ab34c commit bc91eaf

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

src/game/scenes/Game.ts

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ function randomData(scene: Phaser.Scene, x: number, y: number) {
1515
type: '',
1616
ID: ''
1717
}
18-
19-
// const r = Math.random()
20-
// if (r < 0.25) {
21-
// ret.type = 'Booths'
22-
// const index = Math.min(Math.floor(Math.random() * GameData.boothIDs.length), GameData.boothIDs.length - 1)
23-
// ret.ID = GameData.boothIDs[index]
24-
// }
25-
// else {
26-
ret.type = 'Venue'
27-
ret.ID = 'TR212'
28-
// }
2918
return ret
3019
}
3120

@@ -244,9 +233,14 @@ export class Game extends Scene {
244233

245234
const playerCharacterPath = localStorage.getItem('playerCharacter');
246235
if (playerCharacterPath) {
236+
let characterY = targetTile.centerY - GameData.hexHeight;
237+
if (playerCharacterPath === '/assets/人類小啄3.png') {
238+
characterY -= 15;
239+
}
240+
247241
const characterImage = this.add.image(
248242
targetTile.centerX,
249-
targetTile.centerY - GameData.hexHeight,
243+
characterY,
250244
'playerCharacter'
251245
);
252246
const imageScale = (GameData.hexSize * 0.55 * 2) / characterImage.width;

0 commit comments

Comments
 (0)