feat(game/enemies): 所有怪物子类支持 speedMultiplier/hpMultiplier 参数

This commit is contained in:
Cloud Bot
2026-03-21 09:45:17 +00:00
parent bcfd001c11
commit 185fa39b4e
5 changed files with 45 additions and 28 deletions

View File

@@ -3,10 +3,14 @@ import { EnemyBase, type PathPoint } from './EnemyBase'
import { getRandomQuote } from '../data/quotes'
export class OldEmployee extends EnemyBase {
constructor(scene: Phaser.Scene, pathPoints: PathPoint[]) {
super(scene, pathPoints, 150, 50, 8, 30, 'enemy-old')
constructor(
scene: Phaser.Scene,
pathPoints: PathPoint[],
speedMultiplier: number = 1.0,
hpMultiplier: number = 1.0
) {
super(scene, pathPoints, 150, 50, 8, 30, 'enemy-old', speedMultiplier, hpMultiplier)
this.shieldCount = 3
// 老员工比普通怪略大0.85 个格子)
this.imageSprite.setDisplaySize(this.cellW * 0.85, this.cellW * 0.85)
}