| 赞 | 0 |
| VIP | 0 |
| 好人卡 | 0 |
| 积分 | 3 |
| 经验 | 2829 |
| 最后登录 | 2018-9-5 |
| 在线时间 | 53 小时 |
Lv2.观梦者
- 梦石
- 0
- 星屑
- 277
- 在线时间
- 53 小时
- 注册时间
- 2014-1-24
- 帖子
- 18
|
准确来说,在前面的敌人出现概率肯定比后面的多。
function randomArray(array, a, b) {
var resultArray = [];
var GameLength = Math.floor(Math.random() * (b - a + 1) + a);
while (GameLength > 0) {
resultArray.push(Math.floor(Math.random() * array.length + 1));
GameLength -= 1;
}
return resultArray;
} |
|