Skip to main content

MapMaskPiece

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​

MemberWhat it is
MapMaskPiece()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

1 private and internal field
MemberWhat it is
private Image imageThe image showing the piece's sprite.

Properties​

MemberWhat it is
RectTransform RectTransform { get; private set; }This piece's rect transform.

Methods​

MemberWhat 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
MemberWhat it is
private void Awake()Caches the image and rect transform.