Commit a4a4bbb2 authored by linzhiguo's avatar linzhiguo

+ 混乱题序

parent f35af13d
......@@ -186,6 +186,7 @@ cc.Class({
initView() {
window.WL = this;
this.shuffle(this.data.mouses);
this._touched = false;
......@@ -455,5 +456,14 @@ cc.Class({
});
},
// ------------------------------------------
shuffle(arr) {
for (let i=arr.length-1; i>=0; i--) {
let rIndex = Math.floor(Math.random()*(i+1));
let temp = arr[rIndex];
arr[rIndex] = arr[i];
arr[i] = temp;
}
return arr;
},
});
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