Class CommonExtensions
A set of extensions for common things.
Inheritance
Inherited Members
Namespace: Exiled.API.Extensions
Assembly: Exiled.API.dll
Syntax
public static class CommonExtensions
Methods
| Improve this Doc View SourceAdd(AnimationCurve, Single)
Modify the curve with the amount used.
Declaration
public static AnimationCurve Add(this AnimationCurve curve, float amount)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AnimationCurve | curve | The AnimationCurve to mofify. |
System.Single | amount | The add number. |
Returns
Type | Description |
---|---|
UnityEngine.AnimationCurve | The new modfied curve. |
GetRandomValue<T>(IEnumerable<T>)
Gets a random value from an System.Collections.Generic.IEnumerable<T>.
Declaration
public static T GetRandomValue<T>(this IEnumerable<T> enumerable)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | enumerable | System.Collections.Generic.IEnumerable<T> to be used to get a random value. |
Returns
Type | Description |
---|---|
T | Returns a random value from System.Collections.Generic.IEnumerable<T>. |
Type Parameters
Name | Description |
---|---|
T | Type of System.Collections.Generic.IEnumerable<T> elements. |
GetRandomValue<T>(IEnumerable<T>, Func<T, Boolean>)
Gets a random value from an System.Collections.Generic.IEnumerable<T> that matches the provided condition.
Declaration
public static T GetRandomValue<T>(this IEnumerable<T> enumerable, Func<T, bool> condition)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<T> | enumerable | System.Collections.Generic.IEnumerable<T> to be used to get a random value. |
System.Func<T, System.Boolean> | condition | The condition to require. |
Returns
Type | Description |
---|---|
T | Returns a random value from System.Collections.Generic.IEnumerable<T>. |
Type Parameters
Name | Description |
---|---|
T | Type of System.Collections.Generic.IEnumerable<T> elements. |
Multiply(AnimationCurve, Single)
Modify the curve with the amount used.
Declaration
public static AnimationCurve Multiply(this AnimationCurve curve, float amount)
Parameters
Type | Name | Description |
---|---|---|
UnityEngine.AnimationCurve | curve | The AnimationCurve to modify. |
System.Single | amount | The multiplier number. |
Returns
Type | Description |
---|---|
UnityEngine.AnimationCurve | The new modfied curve. |