ManiaMap.Unity
Procedural generation of metroidvania style maps for Unity.
TemplateGroupEntry Class Reference

A TemplateGroup entry. More...

Public Member Functions

TemplateGroupsEntry GetMMTemplateGroupsEntry (Dictionary< RoomTemplateResource, RoomTemplate > templateCache)
 Returns a new generation template group entry. More...
 
void OnValidate ()
 
 TemplateGroupEntry (RoomTemplateResource template)
 Initializes a new entry with no quantity constraints. More...
 
 TemplateGroupEntry (RoomTemplateResource template, int minQuantity, int maxQuantity)
 Initializes a new entry with quantity constraints. More...
 

Properties

int MaxQuantity [getset]
 The maximum number of times this entry is used in a layout. More...
 
int MinQuantity [getset]
 The minimum number of times this entry is used in a layout. More...
 
RoomTemplateResource Template [getset]
 The room template. More...
 

Private Attributes

int _maxQuantity = int.MaxValue
 
int _minQuantity
 
RoomTemplateResource _template
 

Detailed Description

A TemplateGroup entry.

Definition at line 11 of file TemplateGroupEntry.cs.

Constructor & Destructor Documentation

◆ TemplateGroupEntry() [1/2]

Initializes a new entry with no quantity constraints.

Parameters
templateThe room template.

Definition at line 52 of file TemplateGroupEntry.cs.

◆ TemplateGroupEntry() [2/2]

TemplateGroupEntry ( RoomTemplateResource  template,
int  minQuantity,
int  maxQuantity 
)

Initializes a new entry with quantity constraints.

Parameters
templateThe room template.
minQuantityThe minimum use quantity
maxQuantityThe maximum use quantity.

Definition at line 63 of file TemplateGroupEntry.cs.

Member Function Documentation

◆ GetMMTemplateGroupsEntry()

TemplateGroupsEntry GetMMTemplateGroupsEntry ( Dictionary< RoomTemplateResource, RoomTemplate >  templateCache)

Returns a new generation template group entry.

Definition at line 73 of file TemplateGroupEntry.cs.

◆ OnValidate()

void OnValidate ( )

Definition at line 42 of file TemplateGroupEntry.cs.

Member Data Documentation

◆ _maxQuantity

int _maxQuantity = int.MaxValue
private

Definition at line 32 of file TemplateGroupEntry.cs.

◆ _minQuantity

int _minQuantity
private

Definition at line 21 of file TemplateGroupEntry.cs.

◆ _template

RoomTemplateResource _template
private

Definition at line 14 of file TemplateGroupEntry.cs.

Property Documentation

◆ MaxQuantity

int MaxQuantity
getset

The maximum number of times this entry is used in a layout.

Definition at line 36 of file TemplateGroupEntry.cs.

◆ MinQuantity

int MinQuantity
getset

The minimum number of times this entry is used in a layout.

Definition at line 25 of file TemplateGroupEntry.cs.

◆ Template

RoomTemplateResource Template
getset

The room template.

Definition at line 18 of file TemplateGroupEntry.cs.


The documentation for this class was generated from the following file: