Redraw tactical unit sprites for readability
This commit is contained in:
@@ -9598,48 +9598,6 @@ export class BattleScene extends Phaser.Scene {
|
||||
private showFacingIndicator(unit: UnitData) {
|
||||
this.clearFacingIndicator();
|
||||
this.facingIndicatorUnitId = unit.id;
|
||||
|
||||
const view = this.unitViews.get(unit.id);
|
||||
if (!view || unit.hp <= 0 || !this.isTileVisible(unit.x, unit.y)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const direction = this.currentUnitDirection(unit);
|
||||
const vector = this.directionVector(direction);
|
||||
const x = view.sprite.x + vector.x * this.layout.tileSize * 0.34;
|
||||
const y = view.sprite.y + vector.y * this.layout.tileSize * 0.34 - this.layout.tileSize * 0.28;
|
||||
const marker = this.add.circle(x, y, 13, 0x101820, 0.86);
|
||||
marker.setStrokeStyle(1, palette.gold, 0.88);
|
||||
marker.setDepth(34);
|
||||
|
||||
const arrow = this.add.text(x, y - 1, this.directionSymbol(direction), {
|
||||
fontFamily: '"Malgun Gothic", "Noto Sans KR", sans-serif',
|
||||
fontSize: '18px',
|
||||
color: '#ffe28a',
|
||||
fontStyle: '700',
|
||||
stroke: '#05070a',
|
||||
strokeThickness: 3
|
||||
});
|
||||
arrow.setOrigin(0.5);
|
||||
arrow.setDepth(35);
|
||||
|
||||
const label = this.add.text(x, y + 16, this.unitDirectionLabel(direction), {
|
||||
fontFamily: '"Malgun Gothic", "Noto Sans KR", sans-serif',
|
||||
fontSize: '10px',
|
||||
color: '#f4dfad',
|
||||
stroke: '#05070a',
|
||||
strokeThickness: 3
|
||||
});
|
||||
label.setOrigin(0.5, 0);
|
||||
label.setDepth(35);
|
||||
|
||||
if (this.mapMask) {
|
||||
marker.setMask(this.mapMask);
|
||||
arrow.setMask(this.mapMask);
|
||||
label.setMask(this.mapMask);
|
||||
}
|
||||
|
||||
this.facingIndicatorObjects = [marker, arrow, label];
|
||||
}
|
||||
|
||||
private clearFacingIndicator() {
|
||||
|
||||
Reference in New Issue
Block a user