Class RandomSourceBase
Base class for Seed System
Namespace: RandomToolbox
Assembly: cs.temp.dll.dll
Syntax
[Serializable]
public abstract class RandomSourceBase
Fields
m_seed
Current seed
Declaration
protected int m_seed
Field Value
Type | Description |
---|---|
Int32 |
SeedGenerator
Current select seed generator to use for Reseed()
Declaration
public SeedGenerators.Generator SeedGenerator
Field Value
Type | Description |
---|---|
SeedGenerators.Generator |
Properties
Seed
The current seed used
Declaration
public int Seed { get; }
Property Value
Type | Description |
---|---|
Int32 |
Methods
Reseed()
Generate a new seed using the current SeedGenerator value and initialize random source this is a shorthand for 'Start(SeedGenerator.GetSeed());'
Declaration
public void Reseed()
Start()
Initialize the Seed system with the current seed
Declaration
public abstract void Start()
Start(SeedGenerators.Generator)
Initialize the Seed system with a new seed from the given seed generator
Declaration
public void Start(SeedGenerators.Generator seedGenerator)
Parameters
Type | Name | Description |
---|---|---|
SeedGenerators.Generator | seedGenerator | Generator to use to get a new seed |
Start(Boolean)
If reseed is true, generate a new seed using the current SeedGenerator value and initialize random source
Declaration
public void Start(bool reseed)
Parameters
Type | Name | Description |
---|---|---|
Boolean | reseed |
Start(Int32)
Initialize the Seed system with the given new seed
Declaration
public void Start(int newSeed)
Parameters
Type | Name | Description |
---|---|---|
Int32 | newSeed | seed used to initialize the system |