Class GeneratedLevelBase<TRoomInstance, TLevelDescription>
Holds information about a procedurally generated level.
Inheritance
System.Object
GeneratedLevelBase<TRoomInstance, TLevelDescription>
Namespace: Edgar.Unity
Assembly: cs.temp.dll.dll
Syntax
public abstract class GeneratedLevelBase<TRoomInstance, TLevelDescription>
Type Parameters
Name | Description |
---|---|
TRoomInstance | |
TLevelDescription |
Remarks
Currently cannot be serialized by the default Unity serializer.
Constructors
GeneratedLevelBase(Dictionary<RoomBase, TRoomInstance>, GameObject, TLevelDescription)
Declaration
protected GeneratedLevelBase(Dictionary<RoomBase, TRoomInstance> roomInstances, GameObject rootGameObject, TLevelDescription levelDescription)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<RoomBase, TRoomInstance> | roomInstances | |
GameObject | rootGameObject | |
TLevelDescription | levelDescription |
Properties
LevelDescription
Level description based on which was the level generated.
Declaration
public TLevelDescription LevelDescription { get; }
Property Value
Type | Description |
---|---|
TLevelDescription |
RoomInstances
Room instances of all the rooms in the level.
Declaration
public List<TRoomInstance> RoomInstances { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.List<TRoomInstance> |
Remarks
For quick access to individual room instances, GetRoomInstance(RoomBase) can be used.
RootGameObject
GameObject that holds the generated level.
Declaration
public GameObject RootGameObject { get; }
Property Value
Type | Description |
---|---|
GameObject |
Methods
GetRoomInstance(RoomBase)
Declaration
public TRoomInstance GetRoomInstance(RoomBase room)
Parameters
Type | Name | Description |
---|---|---|
RoomBase | room |
Returns
Type | Description |
---|---|
TRoomInstance |