Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TXZS_G_001
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
template admin
TXZS_G_001
Commits
02e0b00c
Commit
02e0b00c
authored
Feb 21, 2023
by
李维
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复数组乱序失效的问题
parent
18951991
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
TXZS_G_001.js
assets/TXZS_G_001/scene/TXZS_G_001.js
+1
-1
No files found.
assets/TXZS_G_001/scene/TXZS_G_001.js
View file @
02e0b00c
...
@@ -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
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment