Example #1
0
    // Returns the probability that this object should appear based off of the current distance
    public float getProbability(float distance)
    {
        // Chance of no probability of no occur says so
        if (noOccurProbabilities.count() > 0)
        {
            float prob = noOccurProbabilities.getValue(distance);
            if (Random.value < prob)
            {
                return(0);
            }
        }

        return(occurProbabilities.getValue(distance));
    }