Class DungeonGenerator<TNode>
Implementation of the procedural dungeon generator algorithm.
Inheritance
System.Object
DungeonGenerator<TNode>
Assembly: Edgar.dll
Syntax
public class DungeonGenerator<TNode> : Object, IRandomInjectable, ICancellable, IObservableGenerator<MapLayout<TNode>>, ILayoutGenerator<MapLayout<TNode>>
Type Parameters
Constructors
DungeonGenerator(IMapDescription<TNode>, DungeonGeneratorConfiguration<TNode>)
Declaration
public DungeonGenerator(IMapDescription<TNode> mapDescription, DungeonGeneratorConfiguration<TNode> configuration = null)
Parameters
Properties
IterationsCount
Number of iterations needed to generate the last level.
Declaration
public int IterationsCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
TimeTotal
Total time to generate a level.
Declaration
public double TimeTotal { get; }
Property Value
Type |
Description |
System.Double |
|
Methods
GenerateLayout()
Declaration
public MapLayout<TNode> GenerateLayout()
Returns
InjectRandomGenerator(Random)
Declaration
public void InjectRandomGenerator(Random random)
Parameters
Type |
Name |
Description |
System.Random |
random |
|
SetCancellationToken(Nullable<CancellationToken>)
Declaration
public void SetCancellationToken(Nullable<CancellationToken> cancellationToken)
Parameters
Type |
Name |
Description |
System.Nullable<System.Threading.CancellationToken> |
cancellationToken |
|
Events
OnPartialValid
Declaration
public event Action<MapLayout<TNode>> OnPartialValid
Event Type
Type |
Description |
System.Action<MapLayout<TNode>> |
|
OnPerturbed
Declaration
public event Action<MapLayout<TNode>> OnPerturbed
Event Type
Type |
Description |
System.Action<MapLayout<TNode>> |
|
OnSimulatedAnnealingEvent
Declaration
public event EventHandler<SimulatedAnnealingEventArgs> OnSimulatedAnnealingEvent
Event Type
OnValid
Declaration
public event Action<MapLayout<TNode>> OnValid
Event Type
Type |
Description |
System.Action<MapLayout<TNode>> |
|
Implements