ProD  4.0
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ProD.Materializer Class Reference

Inherits ProD.Singleton< T >.

Public Member Functions

void MaterializeWorldMap (WorldMap worldMap)
 Materializes the world map. More...
 
void UnmaterializeWorldMap ()
 Unmaterializes the world map by destorying all the prefabs that were instantiated More...
 
void MaterializeMap (Map map)
 Materializes a map. More...
 
GameObject GetPrefab (string type, string[] orientation, string theme)
 Gets the prefab for a specified type of tile. The prefabs need to be in the corresponding directories, or this will return null. More...
 
void PlacePrefab (GameObject prefab, Map map, Address address, string[] orientation)
 Places the prefab by instantiating it at a given location on the map. More...
 

Public Attributes

bool rotateTiles = true
 
bool useIsometric = false
 
bool groupTiles = true
 
TextureManager dataLayer
 

Static Public Attributes

static List< GameObject > allPrefabs = new List<GameObject>()
 
static List< GameObject > allTileGroups = new List<GameObject>()
 

Additional Inherited Members

- Static Protected Attributes inherited from ProD.Singleton< T >
static T instance
 
- Properties inherited from ProD.Singleton< T >
static T Instance [get]
 

Member Function Documentation

GameObject ProD.Materializer.GetPrefab ( string  type,
string[]  orientation,
string  theme 
)

Gets the prefab for a specified type of tile. The prefabs need to be in the corresponding directories, or this will return null.

Returns
The prefab.
Parameters
typeThe type of tile you want the prefab of
orientationThe orientation of the prefab. For example, it could be a corner tile or a straight wall.
themeThe theme of the tile.
void ProD.Materializer.MaterializeMap ( Map  map)

Materializes a map.

Parameters
mapA map of a level.
void ProD.Materializer.MaterializeWorldMap ( WorldMap  worldMap)

Materializes the world map.

Parameters
worldMapThe world map to materialize.
void ProD.Materializer.PlacePrefab ( GameObject  prefab,
Map  map,
Address  address,
string[]  orientation 
)

Places the prefab by instantiating it at a given location on the map.

Parameters
prefabThe prefab.
mapThe map which the tile belongs to.
addressThe adress of the tile in the map.
orientationThe orientation of the tile.
void ProD.Materializer.UnmaterializeWorldMap ( )

Unmaterializes the world map by destorying all the prefabs that were instantiated

Parameters
worldMapWorld map.

Member Data Documentation

List<GameObject> ProD.Materializer.allPrefabs = new List<GameObject>()
static
List<GameObject> ProD.Materializer.allTileGroups = new List<GameObject>()
static
TextureManager ProD.Materializer.dataLayer
bool ProD.Materializer.groupTiles = true
bool ProD.Materializer.rotateTiles = true
bool ProD.Materializer.useIsometric = false