static public SignalField Random() { SignalField res = new SignalField(); res.zoom = UnityEngine.Random.Range(1f, 100); res.densityBias = UnityEngine.Random.Range(-0.2f, 0.2f); res.flattenAmount = UnityEngine.Random.Range(0f, 1); res.flattenOffset = 0; res.type = (SignalType)UnityEngine.Random.Range(0, 5); return(res); }
public void RandomizeFields() { int fieldCount = Random.Range(1, 8); List <SignalField> fields = new List <SignalField>(); for (int i = 0; i < fieldCount; i++) { fields.Add(SignalField.Random()); } fields[0].type = SignalType.AddOnly; signalFields = fields.ToArray(); }