Beispiel #1
0
    public int GetRandomCPI()
    {
        int cpi = MathUtility.CalcWeight(RandomCPITable, (x) => x.weight, totalWeight).CPI;
        int sub = Random.Range(-cpi, cpi + 1);

        cpi = Mathf.Max(0, cpi + sub);
        return(cpi);
    }