/// <summary> /// Add a new value to the selection /// </summary> /// <param name="value">method to be called</param> public static RandomSelectorInstance <T> Add(T value) { var instance = new RandomSelectorInstance <T>(); instance.Add(value); return(instance); }
/// <summary> /// Add a new action to the selection /// </summary> /// <param name="action">method to be called</param> public static RandomSelectorInstance Add(Action action) { var instance = new RandomSelectorInstance(); instance.Add(action); return(instance); }
/// <summary> /// Add a new value to the selection /// </summary> /// <param name="weight">percentage chance to call this method</param> /// <param name="value">method to be called</param> public static RandomSelectorInstance <T> Add(double weight, T value) { var instance = new RandomSelectorInstance <T>(); instance.Add(weight, value); return(instance); }
/// <summary> /// Add a new action to the selection /// </summary> /// <param name="weight">percentage chance to call this method</param> /// <param name="action">method to be called</param> public static RandomSelectorInstance Add(double weight, Action action) { var instance = new RandomSelectorInstance(); instance.Add(weight, action); return(instance); }