12345678910111213141516171819202122232425262728293031323334 |
- import { _decorator, Component, Node } from 'cc';
- import { TableUtil } from './TableUtil';
- const { ccclass, property } = _decorator;
- @ccclass('table_idiom')
- export class table_idiom {
- static readonly TableName: string = "idiom";
- static readonly IdList: number[]=[0,1,2,3,4,5,6,7,8,9,10];
- static get(id: number): table_idiom { return TableUtil.getTable(table_idiom, id) };
- static getList(): table_idiom[] { return TableUtil.getTables(table_idiom,2052) };
- private data: any;
- init(id: number) {
- var table = TableUtil.get(table_idiom.TableName);
- this.data = table[id];
- if (!this.data) console.error("配置表" + table_idiom.TableName + "没有ID:" + id);
- this.id = id;
- }
- /** 编号【KEY】 */
- id: number = 0;
- get idiom():string { return this.data.idiom; }
- get idiom_type():string { return this.data.idiom_type; }
- get difficulty():string { return this.data.difficulty; }
- get piece_1_word():string { return this.data.piece_1_word; }
- get piece_2_word ():string { return this.data.piece_2_word; }
- }
|