C# Класс fCraft.MapGeneration.MapGeneratorParameters

Represents a set of map generator parameters. Provides a way to serialize these parameters to string, and a way to create single-use MapGeneratorState objects. Must be mutable, should implement parameter range validation in property setters, and implement ICloneable, and pass a COPY to MapGeneratorState.
Наследование: ICloneable
Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
ListProperties IEnumerable

Открытые методы

Метод Описание
Clone ( ) : object
CreateGenerator ( ) : MapGeneratorState

Creates MapGeneratorState to create a map with the current parameters and specified dimensions. Does NOT start the generation process yet -- that should be done in MapGeneratorState.Generate()

LoadProperties ( [ baseElement ) : void

Loads generation parameters from XML. All read-write public properties, except those with [XmlIgnore] attribute, are considered. If no corresponding XML element exists, property value is unchanged.

Save ( [ baseElement ) : void

Saves current generation parameters to XML, in a format that's expected to be readable by MapGenerator.CreateParameters(XElement)

ToString ( ) : string

Приватные методы

Метод Описание
ListProperties ( ) : IEnumerable

Описание методов

Clone() публичный Метод

public Clone ( ) : object
Результат object

CreateGenerator() публичный абстрактный Метод

Creates MapGeneratorState to create a map with the current parameters and specified dimensions. Does NOT start the generation process yet -- that should be done in MapGeneratorState.Generate()
public abstract CreateGenerator ( ) : MapGeneratorState
Результат MapGeneratorState

LoadProperties() публичный Метод

Loads generation parameters from XML. All read-write public properties, except those with [XmlIgnore] attribute, are considered. If no corresponding XML element exists, property value is unchanged.
public LoadProperties ( [ baseElement ) : void
baseElement [ Element from which parameters are read. /// Each property corresponds to a child element.
Результат void

Save() публичный Метод

Saves current generation parameters to XML, in a format that's expected to be readable by MapGenerator.CreateParameters(XElement)
public Save ( [ baseElement ) : void
baseElement [ Element onto which the parameters should be attached. /// Each property will correspond to a child element.
Результат void

ToString() публичный Метод

public ToString ( ) : string
Результат string