feat(game/enemies): 完善怪物头顶语录飘字系统,集成语录数据文件,添加跟随移动和淡出动画

This commit is contained in:
Cloud Bot
2026-03-21 08:14:53 +00:00
parent f6694544f0
commit d13e17ffc5
5 changed files with 22 additions and 19 deletions

View File

@@ -1,7 +1,6 @@
import type Phaser from 'phaser'
import { EnemyBase, type PathPoint } from './EnemyBase'
const QUOTES = ['我为公司立过功!', '我有10年经验', '年龄不是问题!']
import { getRandomQuote } from '../data/quotes'
export class OldEmployee extends EnemyBase {
constructor(scene: Phaser.Scene, pathPoints: PathPoint[]) {
@@ -34,6 +33,6 @@ export class OldEmployee extends EnemyBase {
}
getQuote(): string {
return QUOTES[Math.floor(Math.random() * QUOTES.length)]
return getRandomQuote('OldEmployee')
}
}