From 3c47f5dff7356abb40efa8d967d617be75cf67a3 Mon Sep 17 00:00:00 2001 From: yu <www.437551922@qq.com> Date: Fri, 13 May 2022 21:42:45 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/MRBR04/scene/MRBR04.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/MRBR04/scene/MRBR04.ts b/assets/MRBR04/scene/MRBR04.ts index a906b77..e7953f6 100644 --- a/assets/MRBR04/scene/MRBR04.ts +++ b/assets/MRBR04/scene/MRBR04.ts @@ -252,7 +252,9 @@ export default class SceneComponent extends MyCocosSceneComponent { this.downArr.push(dt.down); } }); - this.downArr.sort(() => Math.random() - 0.5); + do { + this.downArr.sort(() => Math.random() - 0.5); + } while (this.downArr[0].id == this.upArr[0].id); } private updateRound() { -- 2.21.0