Skip to main content

CategoryScrollElement

A class in Root.Township, Alta.Customization.

One entry in the customization category scroller. Shows a cosmetic category's icon and switches the cosmetic list to it when pressed.

Constructors​

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

Fields​

4 private and internal fields
MemberWhat it is
private Animator animatorAnimator with the Visible flag.
private CosmeticScrollManager cosmeticManagerCosmetic scroll manager switched when pressed.
private SpriteRenderer iconSprite renderer for the category icon.
private CategoryScrollManager managerCategory scroll manager that lists the available categories.

Properties​

MemberWhat it is
PlayerCosmeticCategory Category { get; private set; }The cosmetic category this element shows.

Methods​

MemberWhat it is
override void Hide()Hides the element through its animator.
void Pressed()If shown, tells the cosmetic scroll manager to show this category.
override void Show(int index)Picks the available category for the index (wrapping), sets the icon and shows it.