mirror of
https://gitee.com/jisol/jisol-game/
synced 2025-09-26 18:26:23 +00:00
提交
This commit is contained in:
@@ -690,6 +690,39 @@ export class TOnHookLevel {
|
||||
}
|
||||
|
||||
|
||||
export namespace TB {
|
||||
export class TbBattleResource {
|
||||
|
||||
constructor(_json_: any) {
|
||||
if (_json_.id === undefined) { throw new Error() }
|
||||
this.id = _json_.id
|
||||
if (_json_.path === undefined) { throw new Error() }
|
||||
this.path = _json_.path
|
||||
if (_json_.type === undefined) { throw new Error() }
|
||||
this.type = _json_.type
|
||||
}
|
||||
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
readonly id: number
|
||||
/**
|
||||
* 资源路径
|
||||
*/
|
||||
readonly path: string
|
||||
/**
|
||||
* 资源类型(0.Spine)
|
||||
*/
|
||||
readonly type: number
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
export class TbGGlobal{
|
||||
@@ -1204,6 +1237,38 @@ export class TbGOnHookMap1{
|
||||
|
||||
|
||||
|
||||
export class TbBattleResource{
|
||||
private _dataMap: Map<number, TB.TbBattleResource>
|
||||
private _dataList: TB.TbBattleResource[]
|
||||
constructor(_json_: any) {
|
||||
this._dataMap = new Map<number, TB.TbBattleResource>()
|
||||
this._dataList = []
|
||||
for(var _json2_ of _json_) {
|
||||
let _v: TB.TbBattleResource
|
||||
_v = new TB.TbBattleResource(_json2_)
|
||||
this._dataList.push(_v)
|
||||
this._dataMap.set(_v.id, _v)
|
||||
}
|
||||
}
|
||||
|
||||
getDataMap(): Map<number, TB.TbBattleResource> { return this._dataMap; }
|
||||
getDataList(): TB.TbBattleResource[] { return this._dataList; }
|
||||
|
||||
get(key: number): TB.TbBattleResource | undefined { return this._dataMap.get(key); }
|
||||
|
||||
resolve(tables:Tables)
|
||||
{
|
||||
for(let data of this._dataList)
|
||||
{
|
||||
data.resolve(tables)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
type JsonLoader = (file: string) => any
|
||||
|
||||
export class Tables {
|
||||
@@ -1239,6 +1304,8 @@ export class Tables {
|
||||
get TbGOnHookMaps(): TbGOnHookMaps { return this._TbGOnHookMaps;}
|
||||
private _TbGOnHookMap1: TbGOnHookMap1
|
||||
get TbGOnHookMap1(): TbGOnHookMap1 { return this._TbGOnHookMap1;}
|
||||
private _TbBattleResource: TbBattleResource
|
||||
get TbBattleResource(): TbBattleResource { return this._TbBattleResource;}
|
||||
|
||||
constructor(loader: JsonLoader) {
|
||||
this._TbGGlobal = new TbGGlobal(loader('tbgglobal'))
|
||||
@@ -1257,6 +1324,7 @@ export class Tables {
|
||||
this._TbGRoleBaseAttribute = new TbGRoleBaseAttribute(loader('tbgrolebaseattribute'))
|
||||
this._TbGOnHookMaps = new TbGOnHookMaps(loader('tbgonhookmaps'))
|
||||
this._TbGOnHookMap1 = new TbGOnHookMap1(loader('tbgonhookmap1'))
|
||||
this._TbBattleResource = new TbBattleResource(loader('tbbattleresource'))
|
||||
|
||||
this._TbGGlobal.resolve(this)
|
||||
this._TbGRole.resolve(this)
|
||||
@@ -1274,5 +1342,6 @@ export class Tables {
|
||||
this._TbGRoleBaseAttribute.resolve(this)
|
||||
this._TbGOnHookMaps.resolve(this)
|
||||
this._TbGOnHookMap1.resolve(this)
|
||||
this._TbBattleResource.resolve(this)
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1 @@
|
||||
[]
|
Reference in New Issue
Block a user