它应该给我一个随机值丢失。它或者给我-.75或.75作为缺失而不是输出列表中的任何值。
var Rando : float;
function Start () {
Amount = Random.Range(8,9);
while (Amount > 0) { //CREATING THE BLOCKS
Rando = (-27.0f + (Random.Range(0,9) * 6.0f)) / 4.0f;
while (AmountArray.Contains(Rando)) {
Rando = (-27.0f + (Random.Range(0,9) * 6.0f)) / 4.0f;
}
AmountArray.Add (Rando);
Amount--;
}
AmountArray.Clear();
}