复制代码
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25复制代码ArrayList list =new ArrayList(); int[] seq=new int[10]; for(int i=1;i<=10;i++){ list.Add(i); } for(int j=0;j<10;j++){ int n=Random.Range(1,list.Count); seq[j]=(int)list[n-1]; list.RemoveAt(n-1); }
复制代码
最后
以上就是饱满小馒头最近收集整理的关于随机生成范围在1到10之间10个不相同的数 Unity C#的全部内容,更多相关随机生成范围在1到10之间10个不相同的数内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复