C# Class Terrarium.Game.Species

Inheritance: ISpecies
Datei anzeigen Open project: eugeniomiro/Terrarium Class Usage Examples

Private Properties

Property Type Description

Public Methods

Method Description
GetAttributeWarnings ( ) : string

Gets attribute warnings for specific attributes when points are being wasted or points are out of bounds.

GetSpeciesFromAssembly ( Assembly organismAssembly ) : Species

Called to create a new species object from the given assembly. This should be the only entry point for creating a new species object.

InitializeNewState ( Point position, int generation ) : OrganismBase.OrganismState

Required method for any derived classes that can be used to create a new state object based on the species.

IsSameSpecies ( ISpecies species ) : bool

This method can be used to compare another species to this species and determine if they match.

Protected Methods

Method Description
Species ( Type clrType ) : System

Creates a new instance of the species class initialized with the given CLR Type pulling various fields out of the Type's attributes.

Method Details

GetAttributeWarnings() public method

Gets attribute warnings for specific attributes when points are being wasted or points are out of bounds.
public GetAttributeWarnings ( ) : string
return string

GetSpeciesFromAssembly() public static method

Called to create a new species object from the given assembly. This should be the only entry point for creating a new species object.
public static GetSpeciesFromAssembly ( Assembly organismAssembly ) : Species
organismAssembly System.Reflection.Assembly The assembly to generate the species from.
return Species

InitializeNewState() public abstract method

Required method for any derived classes that can be used to create a new state object based on the species.
public abstract InitializeNewState ( Point position, int generation ) : OrganismBase.OrganismState
position Point The position for the new state.
generation int The creature's generation for the new state.
return OrganismBase.OrganismState

IsSameSpecies() public method

This method can be used to compare another species to this species and determine if they match.
public IsSameSpecies ( ISpecies species ) : bool
species ISpecies The species to be compared
return bool

Species() protected method

Creates a new instance of the species class initialized with the given CLR Type pulling various fields out of the Type's attributes.
protected Species ( Type clrType ) : System
clrType System.Type The CLR Type to initialize this species.
return System