fix(game): 修复格子正方形和图片尺寸问题,用setDisplaySize精确控制角色图片占一格
This commit is contained in:
@@ -14,9 +14,9 @@ export class BossVP extends EnemyBase {
|
||||
) {
|
||||
super(scene, pathPoints, 800, 40, 30, 150, 'enemy-boss')
|
||||
this.onDestroyTower = onDestroyTower
|
||||
// 放大 BOSS
|
||||
const bossScale = Math.min(this.cellW, this.cellH) / 128 * 1.3
|
||||
this.imageSprite.setScale(bossScale)
|
||||
// BOSS 放大到 1.3 个格子(跨格的威压感)
|
||||
const bossSize = this.cellW * 1.3
|
||||
this.imageSprite.setDisplaySize(bossSize, bossSize)
|
||||
this.imageSprite.setDepth(12)
|
||||
// BOSS 出现特效
|
||||
scene.cameras.main.flash(800, 255, 0, 0, false)
|
||||
|
||||
Reference in New Issue
Block a user