feat(game/enemies): 完善怪物头顶语录飘字系统,集成语录数据文件,添加跟随移动和淡出动画
This commit is contained in:
@@ -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')
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user