21 lines
1.1 KiB
TypeScript
21 lines
1.1 KiB
TypeScript
export default class LocalStorageData {
|
|
private static _instance: LocalStorageData = null;
|
|
public static get Instance(): LocalStorageData {
|
|
return LocalStorageData._instance;
|
|
}
|
|
|
|
constructor() {
|
|
LocalStorageData._instance = this;
|
|
}
|
|
|
|
// =======================================================================================
|
|
public get CompileVersion(): string { return cc.sys.localStorage.getItem("CompileVersion"); }
|
|
public set CompileVersion(value: string) { cc.sys.localStorage.setItem("CompileVersion", value.toString()); }
|
|
public get BundleVersion(): string { return cc.sys.localStorage.getItem("BundleVersion"); }
|
|
public set BundleVersion(value: string) { cc.sys.localStorage.setItem("BundleVersion", value.toString()); }
|
|
public get ComboDeviceID(): string { return cc.sys.localStorage.getItem("ComboDeviceID") || ""; }
|
|
public set ComboDeviceID(value: string) { cc.sys.localStorage.setItem("ComboDeviceID", value); }
|
|
public get BundleUrl(): string { return cc.sys.localStorage.getItem("BundleUrl"); }
|
|
public set BundleUrl(value: string) { cc.sys.localStorage.setItem("BundleUrl", value); }
|
|
}
|