Class CommonExtensions
- Namespace
- Exiled.API.Extensions
- Assembly
- Exiled.API.dll
A set of extensions for common things.
public static class CommonExtensions- Inheritance
- 
      
      CommonExtensions
- Inherited Members
Methods
Add(AnimationCurve, float)
Modify the curve with the amount used.
public static AnimationCurve Add(this AnimationCurve curve, float amount)Parameters
- curveAnimationCurve
- The AnimationCurve to mofify. 
- amountfloat
- The add number. 
Returns
- AnimationCurve
- The new modfied curve. 
GetRandomValue<T>(IEnumerable<T>)
Gets a random value from an IEnumerable<T>.
public static T GetRandomValue<T>(this IEnumerable<T> enumerable)Parameters
- enumerableIEnumerable<T>
- IEnumerable<T> to be used to get a random value. 
Returns
- T
- Returns a random value from IEnumerable<T>. 
Type Parameters
- T
- Type of IEnumerable<T> elements. 
GetRandomValue<T>(IEnumerable<T>, Func<T, bool>)
Gets a random value from an IEnumerable<T> that matches the provided condition.
public static T GetRandomValue<T>(this IEnumerable<T> enumerable, Func<T, bool> condition)Parameters
- enumerableIEnumerable<T>
- IEnumerable<T> to be used to get a random value. 
- conditionFunc<T, bool>
- The condition to require. 
Returns
- T
- Returns a random value from IEnumerable<T>. 
Type Parameters
- T
- Type of IEnumerable<T> elements. 
Multiply(AnimationCurve, float)
Modify the curve with the amount used.
public static AnimationCurve Multiply(this AnimationCurve curve, float amount)Parameters
- curveAnimationCurve
- The AnimationCurve to modify. 
- amountfloat
- The multiplier number. 
Returns
- AnimationCurve
- The new modfied curve.