feat(game/enemies): 所有怪物子类支持 speedMultiplier/hpMultiplier 参数
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user