Commit 3c47f5df authored by yu's avatar yu

随机调整

parent fcd06b81
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment