mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-06-26 03:14:47 +00:00
27 lines
656 B
TypeScript
27 lines
656 B
TypeScript
import { TB } from "../../resources/config/data/schema";
|
|
import { TD, app } from "../App";
|
|
import { BattleMode } from "../battle/GBattleModeManager";
|
|
|
|
|
|
export default class BattleResource {
|
|
|
|
//根据参数获取可能加载的资源
|
|
static getResources(mode:BattleMode,data:any):TB.TbBattleResource[]{
|
|
switch(mode){
|
|
default:
|
|
return TD.TbBattleResource.getDataList();
|
|
}
|
|
}
|
|
|
|
//加载资源
|
|
static async loadResource(mode:BattleMode,data:any){
|
|
|
|
let resources = this.getResources(mode,data);
|
|
//加载资源
|
|
await app.battleRes.loadBattleResources(...resources);
|
|
|
|
}
|
|
|
|
}
|
|
|