[add] first

This commit is contained in:
2023-02-22 09:50:51 +08:00
commit 6260e95bc8
9053 changed files with 4492644 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
import { ResCache } from "../res/res-cache";
import { KeyAnyType } from "../../logic/data/game-type";
export class DataBase {
_data:KeyAnyType = {};
_name:string = '';
constructor() {}
public init(name:string) {
this._name = name;
this._data = ResCache.Instance.getJson(name).json;
this.bind();
}
public bind() {}
public get(name:string) {
const item = this._data[name];
if (item === undefined) {
throw new Error(`${this._name} database not find ${name}.`);
}
return item;
}
}

View File

@@ -0,0 +1,9 @@
{
"ver": "4.0.23",
"importer": "typescript",
"imported": true,
"uuid": "cec94d7e-0d38-4158-80c8-67f7f2bde1cd",
"files": [],
"subMetas": {},
"userData": {}
}