Show / Hide Table of Contents

    Class RandomService

    Inheritance
    Object
    RandomService
    Implements
    IRandomService
    IService
    Namespace: IdleKit.Gameplay
    Assembly: cs.temp.dll.dll
    Syntax
    public class RandomService : ServiceBase, IRandomService, IService

    Fields

    _random

    Declaration
    protected Random _random
    Field Value
    Type Description
    Random

    DEFAULT_SEED

    Declaration
    protected const int DEFAULT_SEED = -1
    Field Value
    Type Description
    Int32

    Properties

    DefaultSeed

    Declaration
    protected virtual int DefaultSeed { get; }
    Property Value
    Type Description
    Int32

    Methods

    CleanupService()

    Declaration
    protected override void CleanupService()

    GetRandomDouble()

    Declaration
    public virtual double GetRandomDouble()
    Returns
    Type Description
    Double

    GetRandomDouble(Double, Double)

    Declaration
    public virtual double GetRandomDouble(double min, double max)
    Parameters
    Type Name Description
    Double min
    Double max
    Returns
    Type Description
    Double

    GetRandomDouble(Double, Double, Int32)

    Declaration
    public virtual double GetRandomDouble(double min, double max, int seed)
    Parameters
    Type Name Description
    Double min
    Double max
    Int32 seed
    Returns
    Type Description
    Double

    GetRandomDouble(Int32)

    Declaration
    public virtual double GetRandomDouble(int seed)
    Parameters
    Type Name Description
    Int32 seed
    Returns
    Type Description
    Double

    GetRandomInt()

    Declaration
    public virtual int GetRandomInt()
    Returns
    Type Description
    Int32

    GetRandomInt(Int32)

    Declaration
    public virtual int GetRandomInt(int seed)
    Parameters
    Type Name Description
    Int32 seed
    Returns
    Type Description
    Int32

    GetRandomInt(Int32, Int32)

    Declaration
    public virtual int GetRandomInt(int min, int max)
    Parameters
    Type Name Description
    Int32 min
    Int32 max
    Returns
    Type Description
    Int32

    GetRandomInt(Int32, Int32, Int32)

    Declaration
    public virtual int GetRandomInt(int min, int max, int seed)
    Parameters
    Type Name Description
    Int32 min
    Int32 max
    Int32 seed
    Returns
    Type Description
    Int32

    GetRandomSeed()

    Declaration
    public virtual int GetRandomSeed()
    Returns
    Type Description
    Int32

    GetRandomWeightedElement<TRandomWeighted>(TRandomWeighted[])

    Declaration
    public virtual TRandomWeighted GetRandomWeightedElement<TRandomWeighted>(TRandomWeighted[] collection)
        where TRandomWeighted : class, IRandomWeighted
    Parameters
    Type Name Description
    TRandomWeighted[] collection
    Returns
    Type Description
    TRandomWeighted
    Type Parameters
    Name Description
    TRandomWeighted

    GetRandomWeightedElement<TRandomWeighted>(TRandomWeighted[], Int32)

    Declaration
    public virtual TRandomWeighted GetRandomWeightedElement<TRandomWeighted>(TRandomWeighted[] collection, int seed)
        where TRandomWeighted : class, IRandomWeighted
    Parameters
    Type Name Description
    TRandomWeighted[] collection
    Int32 seed
    Returns
    Type Description
    TRandomWeighted
    Type Parameters
    Name Description
    TRandomWeighted

    InitializeRandom(Int32)

    Declaration
    public virtual void InitializeRandom(int seed)
    Parameters
    Type Name Description
    Int32 seed

    InitializeService()

    Declaration
    protected override void InitializeService()

    Implements

    IRandomService
    IService
    Back to top Copyright © 2020 East Side Games Inc.