CosmeticScrollElement
A class in Root.Township, Alta.Customization.
One page of the cosmetic scroller in the customization room. Spawns a pickup per slot for the items on that page and shows a lock icon on unowned ones.
- Listed in Customization and screenshots
- Inherits or implements
ScrollElement
Constructors
| Member | What it is |
|---|---|
CosmeticScrollElement() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
10 private and internal fields
| Member | What it is |
|---|---|
private Animator animator | Animator that shows and hides the page. |
private uint[] currentDefinitions | Item hash shown in each slot, 0 for empty. |
private static Logger logger | NLog logger for this class. |
private CosmeticScrollManager manager | Parent scroll manager, which gives the customization session. |
private CustomizationPickup[] pickups | Pickup spawned in each slot. |
private ItemScroller scroller | Item scroller this page belongs to; its count sets how many pages there are. |
private CosmeticScrollSource scrollSource | Source of the item hashes to show. |
private Transform[] slots | Transforms where pickups are placed. |
private GameObject[] unownedIcons | Per-slot icons shown when the item isn't owned. |
private static int Visible | Hash of the animator bool Visible. |
Methods
3 private and internal methods
| Member | What it is |
|---|---|
private void FilterInteractionAfterRelease(Interactor interactor, Interactable interactable, ref bool result) | Interaction filter on the spawned pickups; blocks grabbing while the page is hidden. |
private void OnDestroy() | Destroys the page's pickups and unsubscribes from ownership updates. |
private void UpdateOwned() | Refreshes the unowned icons when the owned list changes. |