HexMapLibrary
Public Member Functions | Properties | List of all members
Wunderwunsch.HexMapLibrary.Generic.Tile< T > Class Template Reference

generic Tile which can have any object with a parameterless constructor as content More...

Inheritance diagram for Wunderwunsch.HexMapLibrary.Generic.Tile< T >:
Wunderwunsch.HexMapLibrary.Tile Wunderwunsch.HexMapLibrary.MapElement

Public Member Functions

 Tile (Vector3Int position, int index, Vector2 normalizedPosition, bool createDefaultDataObject=true)
 constructor without passing an instance of T in, creating a default instance of E by calling it's parameterless constructor More...
 
 Tile (Vector3Int position, int index, Vector2 normalizedPosition, T data)
 constructor including an instance of T More...
 
- Public Member Functions inherited from Wunderwunsch.HexMapLibrary.Tile
 Tile (Vector3Int position, int index, Vector2 normalizedPosition)
 Initializes a new tile instance More...
 
- Public Member Functions inherited from Wunderwunsch.HexMapLibrary.MapElement
override string ToString ()
 returns a string with 3 Lines, one each for Index, Position and NormalizedPosition More...
 

Properties

Data [get, set]
 can be any object, defines the actual content of the Tile More...
 
- Properties inherited from Wunderwunsch.HexMapLibrary.Tile
override Vector3 CartesianPosition [get]
 returns the cartesian coordinate of the tile center More...
 
- Properties inherited from Wunderwunsch.HexMapLibrary.MapElement
int Index [get, private set]
 index of the MapElement, HexMap.Tiles , HexMap.Edges and HexMap.Corners arrays are mapped based on this. Can be arbitrarily chosen as long as it starts with 0 and has no gaps. More...
 
Vector3Int Position [get, private set]
 coordinate of the MapElement More...
 
abstract Vector3 CartesianPosition [get]
 returns the cartesian coordinate of the MapElement More...
 
Vector2 NormalizedPosition [get, private set]
 position normalised to a range of [0...1] based on the boundingbox of the map tiles,edges or corners More...
 

Additional Inherited Members

- Protected Member Functions inherited from Wunderwunsch.HexMapLibrary.MapElement
 MapElement (Vector3Int position, int index, Vector2 normalizedPosition)
 base constructor called by derived classes of MapElement More...
 

Detailed Description

generic Tile which can have any object with a parameterless constructor as content

Type Constraints
T :new() 

Constructor & Destructor Documentation

◆ Tile() [1/2]

Wunderwunsch.HexMapLibrary.Generic.Tile< T >.Tile ( Vector3Int  position,
int  index,
Vector2  normalizedPosition,
bool  createDefaultDataObject = true 
)

constructor without passing an instance of T in, creating a default instance of E by calling it's parameterless constructor

◆ Tile() [2/2]

Wunderwunsch.HexMapLibrary.Generic.Tile< T >.Tile ( Vector3Int  position,
int  index,
Vector2  normalizedPosition,
data 
)

constructor including an instance of T

Property Documentation

◆ Data

can be any object, defines the actual content of the Tile