Show / Hide Table of Contents

Class DungeonGenerator<TNode>

Implementation of the procedural dungeon generator algorithm.

Inheritance
System.Object
DungeonGenerator<TNode>
Implements
IRandomInjectable
ICancellable
IObservableGenerator<MapLayout<TNode>>
ILayoutGenerator<MapLayout<TNode>>
Namespace: Edgar.Legacy.Core.LayoutGenerators.DungeonGenerator
Assembly: Edgar.dll
Syntax
public class DungeonGenerator<TNode> : Object, IRandomInjectable, ICancellable, IObservableGenerator<MapLayout<TNode>>, ILayoutGenerator<MapLayout<TNode>>
Type Parameters
Name Description
TNode

Constructors

DungeonGenerator(IMapDescription<TNode>, DungeonGeneratorConfiguration<TNode>)

Declaration
public DungeonGenerator(IMapDescription<TNode> mapDescription, DungeonGeneratorConfiguration<TNode> configuration = null)
Parameters
Type Name Description
IMapDescription<TNode> mapDescription
DungeonGeneratorConfiguration<TNode> configuration

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()

Generates a level.

Declaration
public MapLayout<TNode> GenerateLayout()
Returns
Type Description
MapLayout<TNode>

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
Type Description
System.EventHandler<SimulatedAnnealingEventArgs>

OnValid

Declaration
public event Action<MapLayout<TNode>> OnValid
Event Type
Type Description
System.Action<MapLayout<TNode>>

Implements

IRandomInjectable
ICancellable
IObservableGenerator<TLayout>
ILayoutGenerator<TLayout>
Back to top Generated by DocFX