This commit is contained in:
DESKTOP-5RP3AKU\Jisol
2024-01-19 02:42:37 +08:00
parent bc2ddf1fcd
commit ed4e094536
36 changed files with 3752 additions and 123 deletions

View File

@@ -52,6 +52,11 @@ export default class ResourceData extends BaseData{
}
//获取所有资源Id
getIds():number[]{
return Object.keys(this.data).map(id => parseInt(id));
}
//获取指定资源的数量
getValue(type:ResourceType){
return this.data[type] || 0;