Curvy  2.3.0
CurvyGenerator Class Reference
+ Inheritance diagram for CurvyGenerator:
+ Collaboration diagram for CurvyGenerator:

Detailed Description

Curvy Generator component

Public Attributes

List< CGModuleModules = new List<CGModule>()
 List of modules this Generator contains More...
 
Dictionary< int, CGModuleModulesByID = new Dictionary<int, CGModule>()
 Dictionary to get a module by it's ID More...
 

Properties

bool AutoRefresh [get, set]
 Gets or sets whether to automatically call Refresh if neccessary More...
 
bool Destroying [get]
 Gets whether the Generator is about to get destroyed More...
 
bool IsInitialized [get]
 Gets whether the module and all its dependencies are fully initialized More...
 
CurvyCGEvent OnRefresh [get, set]
 Event raised after refreshing the Generator More...
 
PoolManager PoolManager [get]
 Gets the PoolManager More...
 
int RefreshDelay [get, set]
 Gets or sets the minimum delay between two consecutive calls to <see cref="Refresh" while playing More...
 
int RefreshDelayEditor [get, set]
 Gets or sets the minimum delay between two consecutive calls to <see cref="Refresh" in the editor More...
 
bool ShowDebug [get, set]
 Gets or sets whether to show debug outputs More...
 

Public Member Functions

CGModule AddModule (System.Type type)
 Adds a Module More...
 
AddModule< T > ()
 Adds a Module More...
 
void ArrangeModules ()
 Auto-Arrange modules' graph canvas position More...
 
void Clear ()
 Clear the whole generator More...
 
void DeleteModule (CGModule module)
 Deletes a module (same as PCGModule.Delete()) More...
 
List< T > FindModules< T > (bool includeOnRequestProcessing=false)
 Find modules of a given type More...
 
CGModule GetModule (int moduleID, bool includeOnRequestProcessing=false)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules More...
 
CGModule GetModule (string moduleName, bool includeOnRequestProcessing=false)
 Gets a module by name, either including or excluding IOnRequestProcessing modules More...
 
GetModule< T > (int moduleID, bool includeOnRequestProcessing=false)
 Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
GetModule< T > (string moduleName, bool includeOnRequestProcessing=false)
 Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version) More...
 
CGModuleOutputSlot GetModuleOutputSlot (int moduleId, string slotName)
 Gets a module's output slot by module ID and slotName More...
 
CGModuleOutputSlot GetModuleOutputSlot (string moduleName, string slotName)
 Gets a module's output slot by module name and slotName More...
 
List< CGModuleGetModules (bool includeOnRequestProcessing=false)
 Gets a list of modules, either including or excluding IOnRequestProcessing modules More...
 
void Initialize (bool force=false)
 Initializes the Generator More...
 
void Refresh (bool forceUpdate=false)
 Refreshes the Generator More...
 

Static Public Member Functions

static CurvyGenerator Create ()
 Creates a new GameObject with a CurvyGenerator attached More...
 

Protected Member Functions

CurvyCGEventArgs OnRefreshEvent (CurvyCGEventArgs e)
 

Member Function Documentation

CGModule AddModule ( System.Type  type)

Adds a Module

Parameters
typetype of the Module
Returns
the new Module
T AddModule< T > ( )

Adds a Module

Template Parameters
Ttype of the Module
Returns
the new Module
Type Constraints
T :CGModule 
void ArrangeModules ( )

Auto-Arrange modules' graph canvas position

void Clear ( )

Clear the whole generator

static CurvyGenerator Create ( )
static

Creates a new GameObject with a CurvyGenerator attached

Returns
the Generator component
void DeleteModule ( CGModule  module)

Deletes a module (same as PCGModule.Delete())

Parameters
modulea module
List<T> FindModules< T > ( bool  includeOnRequestProcessing = false)

Find modules of a given type

Template Parameters
Tthe module type
Parameters
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Returns
a list of zero or more modules
Type Constraints
T :CGModule 
CGModule GetModule ( int  moduleID,
bool  includeOnRequestProcessing = false 
)

Gets a module by ID, either including or excluding IOnRequestProcessing modules

Parameters
moduleIDthe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
CGModule GetModule ( string  moduleName,
bool  includeOnRequestProcessing = false 
)

Gets a module by name, either including or excluding IOnRequestProcessing modules

Parameters
moduleName
includeOnRequestProcessing
T GetModule< T > ( int  moduleID,
bool  includeOnRequestProcessing = false 
)

Gets a module by ID, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleIDthe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Type Constraints
T :CGModule 
T GetModule< T > ( string  moduleName,
bool  includeOnRequestProcessing = false 
)

Gets a module by name, either including or excluding IOnRequestProcessing modules (Generic version)

Template Parameters
Ttype of the module
Parameters
moduleNamethe ID of the module in question
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
Type Constraints
T :CGModule 
CGModuleOutputSlot GetModuleOutputSlot ( int  moduleId,
string  slotName 
)

Gets a module's output slot by module ID and slotName

Parameters
moduleIdId of the module
slotNameName of the slot
CGModuleOutputSlot GetModuleOutputSlot ( string  moduleName,
string  slotName 
)

Gets a module's output slot by module name and slotName

Parameters
moduleNameName of the module
slotNameName of the slot
List<CGModule> GetModules ( bool  includeOnRequestProcessing = false)

Gets a list of modules, either including or excluding IOnRequestProcessing modules

Parameters
includeOnRequestProcessingwhether to include IOnRequestProcessing modules
void Initialize ( bool  force = false)

Initializes the Generator

Parameters
forcetrue to force reinitialization
CurvyCGEventArgs OnRefreshEvent ( CurvyCGEventArgs  e)
protected
void Refresh ( bool  forceUpdate = false)

Refreshes the Generator

Parameters
forceUpdatetrue to force a refresh of all modules

Member Data Documentation

List<CGModule> Modules = new List<CGModule>()

List of modules this Generator contains

Dictionary<int, CGModule> ModulesByID = new Dictionary<int, CGModule>()

Dictionary to get a module by it's ID

Property Documentation

bool AutoRefresh
getset

Gets or sets whether to automatically call Refresh if neccessary

bool Destroying
get

Gets whether the Generator is about to get destroyed

bool IsInitialized
get

Gets whether the module and all its dependencies are fully initialized

CurvyCGEvent OnRefresh
getset

Event raised after refreshing the Generator

PoolManager PoolManager
get

Gets the PoolManager

int RefreshDelay
getset

Gets or sets the minimum delay between two consecutive calls to <see cref="Refresh" while playing

int RefreshDelayEditor
getset

Gets or sets the minimum delay between two consecutive calls to <see cref="Refresh" in the editor

bool ShowDebug
getset

Gets or sets whether to show debug outputs


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