430 lines
10 KiB
TypeScript
Raw Normal View History

2023-11-05 04:40:09 +08:00
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
2023-11-06 02:25:02 +08:00
export namespace TB {
export class TbGRole {
2023-11-05 04:40:09 +08:00
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
2023-11-06 02:25:02 +08:00
if (_json_.roleName === undefined) { throw new Error() }
this.roleName = _json_.roleName
if (_json_.spine === undefined) { throw new Error() }
this.spine = _json_.spine
if (_json_.roleSkillIds === undefined) { throw new Error() }
{ this.roleSkillIds = []; for(let _ele of _json_.roleSkillIds) { let _e; _e = _ele; this.roleSkillIds.push(_e);}}
if (_json_.roleAttackRange === undefined) { throw new Error() }
this.roleAttackRange = _json_.roleAttackRange
2023-11-05 04:40:09 +08:00
}
/**
2023-11-06 02:25:02 +08:00
* id
2023-11-05 04:40:09 +08:00
*/
readonly id: number
/**
2023-11-06 02:25:02 +08:00
*
2023-11-05 04:40:09 +08:00
*/
2023-11-06 02:25:02 +08:00
readonly roleName: string
2023-11-05 04:40:09 +08:00
/**
2023-11-06 02:25:02 +08:00
*
2023-11-05 04:40:09 +08:00
*/
2023-11-06 02:25:02 +08:00
readonly spine: string
2023-11-05 04:40:09 +08:00
/**
2023-11-06 02:25:02 +08:00
* Id列表
2023-11-05 04:40:09 +08:00
*/
2023-11-06 02:25:02 +08:00
readonly roleSkillIds: number[]
/**
*
*/
readonly roleAttackRange: number
resolve(tables:Tables)
{
}
}
}
export namespace TB {
export class TbGMap {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.mapName === undefined) { throw new Error() }
this.mapName = _json_.mapName
if (_json_.map1 === undefined) { throw new Error() }
this.map1 = _json_.map1
if (_json_.map2 === undefined) { throw new Error() }
this.map2 = _json_.map2
if (_json_.map3 === undefined) { throw new Error() }
this.map3 = _json_.map3
if (_json_.map1OffsetY === undefined) { throw new Error() }
this.map1OffsetY = _json_.map1OffsetY
if (_json_.map2OffsetY === undefined) { throw new Error() }
this.map2OffsetY = _json_.map2OffsetY
if (_json_.map3OffsetY === undefined) { throw new Error() }
this.map3OffsetY = _json_.map3OffsetY
}
/**
* id
*/
readonly id: number
/**
*
*/
readonly mapName: string
/**
* 1()
*/
readonly map1: string
/**
* 2()
*/
readonly map2: string
/**
* 3()
*/
readonly map3: string
/**
* 1() Y
*/
readonly map1OffsetY: number
/**
* 2() Y
*/
readonly map2OffsetY: number
/**
* 2() Y
*/
readonly map3OffsetY: number
resolve(tables:Tables)
{
}
}
}
export namespace TB {
export class TbGRoleAttack {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.attackWay === undefined) { throw new Error() }
this.attackWay = _json_.attackWay
if (_json_.attackArgs === undefined) { throw new Error() }
{ this.attackArgs = []; for(let _ele of _json_.attackArgs) { let _e; _e = _ele; this.attackArgs.push(_e);}}
}
/**
* Id
*/
readonly id: number
/**
*
*/
readonly attackWay: string
/**
*
*/
readonly attackArgs: string[]
resolve(tables:Tables)
{
}
}
}
export namespace TB {
export class TbGRoleBattleRes {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.resName === undefined) { throw new Error() }
this.resName = _json_.resName
if (_json_.resType === undefined) { throw new Error() }
this.resType = _json_.resType
if (_json_.resSrc === undefined) { throw new Error() }
this.resSrc = _json_.resSrc
}
/**
* id
*/
readonly id: number
/**
*
*/
readonly resName: string
/**
*
*/
readonly resType: string
/**
*
*/
readonly resSrc: string
2023-11-05 04:40:09 +08:00
resolve(tables:Tables)
{
}
}
2023-11-06 02:25:02 +08:00
}
export namespace TB {
export class TbGRoleSkill {
constructor(_json_: any) {
if (_json_.id === undefined) { throw new Error() }
this.id = _json_.id
if (_json_.skillName === undefined) { throw new Error() }
this.skillName = _json_.skillName
if (_json_.skillController === undefined) { throw new Error() }
this.skillController = _json_.skillController
if (_json_.skillArgs === undefined) { throw new Error() }
{ this.skillArgs = []; for(let _ele of _json_.skillArgs) { let _e; _e = _ele; this.skillArgs.push(_e);}}
if (_json_.skillText === undefined) { throw new Error() }
this.skillText = _json_.skillText
}
/**
* Id
*/
readonly id: number
/**
*
*/
readonly skillName: string
/**
*
*/
readonly skillController: string
/**
*
*/
readonly skillArgs: string[]
/**
*
*/
readonly skillText: string
resolve(tables:Tables)
{
}
}
}
2023-11-05 04:40:09 +08:00
export class TbGRole{
2023-11-06 02:25:02 +08:00
private _dataMap: Map<number, TB.TbGRole>
private _dataList: TB.TbGRole[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGRole>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGRole
_v = new TB.TbGRole(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGRole> { return this._dataMap; }
getDataList(): TB.TbGRole[] { return this._dataList; }
get(key: number): TB.TbGRole | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGMap{
private _dataMap: Map<number, TB.TbGMap>
private _dataList: TB.TbGMap[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGMap>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGMap
_v = new TB.TbGMap(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGMap> { return this._dataMap; }
getDataList(): TB.TbGMap[] { return this._dataList; }
get(key: number): TB.TbGMap | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGRoleAttack{
private _dataMap: Map<number, TB.TbGRoleAttack>
private _dataList: TB.TbGRoleAttack[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGRoleAttack>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGRoleAttack
_v = new TB.TbGRoleAttack(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGRoleAttack> { return this._dataMap; }
getDataList(): TB.TbGRoleAttack[] { return this._dataList; }
get(key: number): TB.TbGRoleAttack | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGRoleBattleRes{
private _dataMap: Map<number, TB.TbGRoleBattleRes>
private _dataList: TB.TbGRoleBattleRes[]
constructor(_json_: any) {
this._dataMap = new Map<number, TB.TbGRoleBattleRes>()
this._dataList = []
for(var _json2_ of _json_) {
let _v: TB.TbGRoleBattleRes
_v = new TB.TbGRoleBattleRes(_json2_)
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
getDataMap(): Map<number, TB.TbGRoleBattleRes> { return this._dataMap; }
getDataList(): TB.TbGRoleBattleRes[] { return this._dataList; }
get(key: number): TB.TbGRoleBattleRes | undefined { return this._dataMap.get(key); }
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
export class TbGRoleSkill{
private _dataMap: Map<number, TB.TbGRoleSkill>
private _dataList: TB.TbGRoleSkill[]
2023-11-05 04:40:09 +08:00
constructor(_json_: any) {
2023-11-06 02:25:02 +08:00
this._dataMap = new Map<number, TB.TbGRoleSkill>()
2023-11-05 04:40:09 +08:00
this._dataList = []
for(var _json2_ of _json_) {
2023-11-06 02:25:02 +08:00
let _v: TB.TbGRoleSkill
_v = new TB.TbGRoleSkill(_json2_)
2023-11-05 04:40:09 +08:00
this._dataList.push(_v)
this._dataMap.set(_v.id, _v)
}
}
2023-11-06 02:25:02 +08:00
getDataMap(): Map<number, TB.TbGRoleSkill> { return this._dataMap; }
getDataList(): TB.TbGRoleSkill[] { return this._dataList; }
2023-11-05 04:40:09 +08:00
2023-11-06 02:25:02 +08:00
get(key: number): TB.TbGRoleSkill | undefined { return this._dataMap.get(key); }
2023-11-05 04:40:09 +08:00
resolve(tables:Tables)
{
for(let data of this._dataList)
{
data.resolve(tables)
}
}
}
type JsonLoader = (file: string) => any
export class Tables {
private _TbGRole: TbGRole
get TbGRole(): TbGRole { return this._TbGRole;}
2023-11-06 02:25:02 +08:00
private _TbGMap: TbGMap
get TbGMap(): TbGMap { return this._TbGMap;}
private _TbGRoleAttack: TbGRoleAttack
get TbGRoleAttack(): TbGRoleAttack { return this._TbGRoleAttack;}
private _TbGRoleBattleRes: TbGRoleBattleRes
get TbGRoleBattleRes(): TbGRoleBattleRes { return this._TbGRoleBattleRes;}
private _TbGRoleSkill: TbGRoleSkill
get TbGRoleSkill(): TbGRoleSkill { return this._TbGRoleSkill;}
2023-11-05 04:40:09 +08:00
constructor(loader: JsonLoader) {
this._TbGRole = new TbGRole(loader('tbgrole'))
2023-11-06 02:25:02 +08:00
this._TbGMap = new TbGMap(loader('tbgmap'))
this._TbGRoleAttack = new TbGRoleAttack(loader('tbgroleattack'))
this._TbGRoleBattleRes = new TbGRoleBattleRes(loader('tbgrolebattleres'))
this._TbGRoleSkill = new TbGRoleSkill(loader('tbgroleskill'))
2023-11-05 04:40:09 +08:00
this._TbGRole.resolve(this)
2023-11-06 02:25:02 +08:00
this._TbGMap.resolve(this)
this._TbGRoleAttack.resolve(this)
this._TbGRoleBattleRes.resolve(this)
this._TbGRoleSkill.resolve(this)
2023-11-05 04:40:09 +08:00
}
}