public class PlantMaterialFactory
extends java.lang.Object
Material
s for
PlantComponent
s. It also stores the keys for said Materials when
being stored in the PlantAppState.Constructor and Description |
---|
PlantMaterialFactory(PlantAppState app)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
createMaterials()
Creates the materials for supported
PlantComponent s and adds them
to the PlantAppState associated with this factory. |
void |
disposeMaterials()
Disposes of all materials for supported
PlantComponent s and
removes them from the associated PlantAppState . |
java.lang.String |
getKey(PlantComponent component)
Get the Material key for a particular type of PlantComponent.
|
public PlantMaterialFactory(PlantAppState app)
app
- The PlantAppState that employs this factory. This cannot be
changed.public java.lang.String getKey(PlantComponent component)
component
- The PlantComponent that needs a Material.public void createMaterials()
PlantComponent
s and adds them
to the PlantAppState
associated with this factory.public void disposeMaterials()
PlantComponent
s and
removes them from the associated PlantAppState
.