Skip to content
CaptainBubbles edited this page Jul 3, 2014 · 1 revision

Rul.RandObject

This class can be used as a container in order to make selecting random objects easier. RandObject simply binds a probability(between 0 and 1) to an element of any type.

##Fields

T Element

The object that this RandObject contains

float Probability

The probability for this RandObject to be selected by Rul.RandElement

##Constructor

RandObject(T element, float prob)

Creates a new RandObject with the given object and probability