Search Results for

    Show / Hide Table of Contents

    Class CommonExtensions

    A set of extensions for common things.

    Inheritance
    System.Object
    CommonExtensions
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Exiled.API.Extensions
    Assembly: Exiled.API.dll
    Syntax
    public static class CommonExtensions

    Methods

    | Improve this Doc View Source

    Add(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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    | Improve this Doc View Source

    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.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX