dd
This commit is contained in:
28
assets/script/game/map/HeroList.ts
Normal file
28
assets/script/game/map/HeroList.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
|
||||
|
||||
/** 策划 Excel 导出的 Json 静态数据 */
|
||||
export class HeroList {
|
||||
static TableName: string = "config/game/heros";
|
||||
|
||||
/** 静态表中一条数据 */
|
||||
private data: any;
|
||||
|
||||
init() {
|
||||
var table = oops.res.get(HeroList.TableName);
|
||||
this.data = table['json']['list'];
|
||||
|
||||
}
|
||||
|
||||
/** 数据唯一编号 */
|
||||
id: number = 0;
|
||||
|
||||
/** 数据 */
|
||||
get list(): number {
|
||||
let res:any = []
|
||||
for(let i=0;i<this.data.length;i++)
|
||||
{
|
||||
res[this.data[i].uuid] = this.data[i];
|
||||
}
|
||||
return res;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user