Languages |
---|
English, 简体中文, 繁體中文 |
Add using SheepYhangCN.RandomExtension;
at the head of your C# file
<RandomInst>.Choose<T>(value1,value2,value3...)
=> Random selected value
<RandomInst>.FiftyFifty()
=> true/false
<RandomInst>.FiftyFifty<T>(value1,value2)
=> 50% chance get value1, 50% chance get value2
<RandomInst>.Chance(chance)
=> You inserted chance to get true, otherwise get false
<RandomInst>.Chance<T>(chance,value1,value2,value3...)
=> You inserted chance to get value1, otherwise get a random value in [value2,value3...]
<RandomInst>.ChancePerItem<T>({[value1,chance],[value2,chance]...})
=> You inserted chances to get values