20 lines
345 B
C#
20 lines
345 B
C#
using UnityEngine;
|
|
|
|
[System.Serializable]
|
|
public class Range{
|
|
public float min, max;
|
|
|
|
public Range(float _min, float _max){
|
|
min = _min;
|
|
max = _max;
|
|
}
|
|
|
|
public float GetRandom(){
|
|
return Random.Range(min,max);
|
|
}
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"min:{min}, max:{max}";
|
|
}
|
|
} |