feat(game): 添加全套音效系统(背景BGM+7种攻击音+波次/Boss/死亡/建塔音效),纯Web Audio API合成
This commit is contained in:
@@ -2,6 +2,7 @@ import type Phaser from 'phaser'
|
||||
import { GameManager } from '../GameManager'
|
||||
import { HUD_HEIGHT, COFFEE_COST, STAMINA_MAX, STAMINA_REGEN } from '../constants'
|
||||
import { getCellSize } from '../mapRenderer'
|
||||
import { AudioEngine } from '../AudioEngine'
|
||||
import type { EnemyBase } from '../enemies/EnemyBase'
|
||||
|
||||
export abstract class TowerBase {
|
||||
@@ -141,6 +142,8 @@ export abstract class TowerBase {
|
||||
this.isActive = true
|
||||
this.imageSprite.setAlpha(1)
|
||||
this.updateStaminaBar()
|
||||
// 购买咖啡音效
|
||||
AudioEngine.getInstance().playDingTalk()
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user