You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
988 B
29 lines
988 B
|
3 weeks ago
|
import type {
|
||
|
|
AbilityDef,
|
||
|
|
BuffDef,
|
||
|
|
LevelDef,
|
||
|
|
UnitDef,
|
||
|
|
WaveDef,
|
||
|
|
} from './BattleConfigTypes';
|
||
|
|
|
||
|
|
/** 配置提供者:各项目实现,从 Excel/JSON/Remote 加载 */
|
||
|
|
export interface IConfigProvider {
|
||
|
|
/** @param id 单位 ID */
|
||
|
|
getUnit(id: string): UnitDef | undefined;
|
||
|
|
/** @param id 技能 ID */
|
||
|
|
getAbility(id: string): AbilityDef | undefined;
|
||
|
|
/** @param id Buff ID */
|
||
|
|
getBuff(id: string): BuffDef | undefined;
|
||
|
|
/** @param id 关卡 ID */
|
||
|
|
getLevel(id: string): LevelDef | undefined;
|
||
|
|
/**
|
||
|
|
* @param levelId 关卡 ID
|
||
|
|
* @param waveIndex 波次索引(0-based)
|
||
|
|
*/
|
||
|
|
getWave(levelId: string, waveIndex: number): WaveDef | undefined;
|
||
|
|
/** 运行时注册/覆盖 Buff(业务层动态生成的 buff 用,可选) */
|
||
|
|
registerBuff?(id: string, def: BuffDef): void;
|
||
|
|
/** 运行时注册/覆盖技能(业务层动态生成的大招用,可选) */
|
||
|
|
registerAbility?(id: string, def: AbilityDef): void;
|
||
|
|
}
|