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,8 +1,7 @@
import type Phaser from 'phaser'
import { EnemyBase, type PathPoint } from './EnemyBase'
import { GameManager } from '../GameManager'
const QUOTES = ['录音笔已开启', '这是违法的!', '我要仲裁!']
import { getRandomQuote } from '../data/quotes'
export class TroubleMaker extends EnemyBase {
constructor(scene: Phaser.Scene, pathPoints: PathPoint[]) {
@@ -49,6 +48,6 @@ export class TroubleMaker extends EnemyBase {
}
getQuote(): string {
return QUOTES[Math.floor(Math.random() * QUOTES.length)]
return getRandomQuote('TroubleMaker')
}
}