A class in Root.Township, the global namespace.
Pooled UI image for one piece of the map mask; Setup places and sizes it from a MapPiece. Client.
Constructors
| Member | What it is |
|---|
MapMaskPiece() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
1 private and internal field
| Member | What it is |
|---|
private Image image | The image showing the piece's sprite. |
Properties
| Member | What it is |
|---|
RectTransform RectTransform { get; private set; } | This piece's rect transform. |
Methods
| Member | What it is |
|---|
void Setup(MapPiece piece, RectTransform parent, float resolution) | Sets the sprite, parent, size, position and scale from the map piece and the map resolution. |
1 private and internal method
| Member | What it is |
|---|
private void Awake() | Caches the image and rect transform. |