Commit 02e0b00c authored by 李维's avatar 李维

修复数组乱序失效的问题

parent 18951991
...@@ -139,7 +139,7 @@ cc.Class({ ...@@ -139,7 +139,7 @@ cc.Class({
} }
// 打乱数组 - 取前errNum个元素返回 // 打乱数组 - 取前errNum个元素返回
temp_arr.sort(()=>Math.random()>0.5?true:false) temp_arr.sort(()=>Math.random()>0.5?-1:1)
return temp_arr.splice(0, errNum); return temp_arr.splice(0, errNum);
} }
......
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