修复未设置随机种子时,调用随机数报错问题

This commit is contained in:
dgflash
2023-04-10 10:31:14 +08:00
parent 4e83d61af2
commit d1163ad3ec

View File

@@ -15,6 +15,7 @@ export class RandomManager {
static get instance(): RandomManager {
if (this._instance == null) {
this._instance = new RandomManager();
this._instance.random = Math.random;
}
return this._instance;
}