修复打包时,多语言模块的循环引用问题

This commit is contained in:
dgflash
2022-02-10 22:16:45 +08:00
parent 7ceeaf4859
commit c2c9b7d603
27 changed files with 127 additions and 135 deletions

View File

@@ -1,5 +1,5 @@
import { Component, game, Node } from "cc";
import { engine } from "../../Engine";
import { storage } from "../storage/SqlUtil";
import { AudioEffect } from "./AudioEffect";
import { AudioMusic } from "./AudioMusic";
@@ -38,7 +38,7 @@ export class AudioManager extends Component {
private _localStorageTag: string = ""; // 本地存储标签名
private init() {
let data = engine.storage.get(this._localStorageTag);
let data = storage.get(this._localStorageTag);
if (data) {
try {
this.local_data = JSON.parse(data);
@@ -155,6 +155,6 @@ export class AudioManager extends Component {
this.local_data.switch_effect = this._switch_effect;
let data = JSON.stringify(this.local_data);
engine.storage.set(this._localStorageTag, data);
storage.set(this._localStorageTag, data);
}
}

View File

@@ -7,7 +7,7 @@ import { PREVIEW } from "cc/env";
import { EncryptUtil } from "./EncryptUtil";
import { md5 } from "./Md5";
export module SqlUtil {
export module storage {
let _key: string | null = null;
let _iv: string | null = null;
let _id: number = -1;