StoreRotationPopup
A class in Root.Township, the global namespace.
Client tool that, after login, shows a popup with the current shop banner once per shop rotation. Remembers the last rotation it showed in player preferences.
- Listed in Global namespace: S
- Inherits or implements
LoggedInTool
Constructors
| Member | What it is |
|---|---|
StoreRotationPopup() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private static readonly int _MainTex | Shader property id for _MainTex. |
private const string LastStoreRotationPrefsKey | Player preference key holding the hash of the last rotation shown. |
private static Logger logger | NLog logger for popup errors. |
private PopupBoard popupBoard | Popup board prefab to show. |
private Texture storeBanner | The downloaded banner texture. |
private Material targetMaterial | Material the banner texture is put on. |
private UnityWebRequest www | The running banner download request. |
Methods
4 private and internal methods
| Member | What it is |
|---|---|
private void Clear() | Removes the banner texture from the material, destroys it and aborts any running download. |
private void CloseBoard(IPopupBoard board) | Clears the banner when the popup closes. |
private int GetHashForConfiguration(ShopPageConfiguration configuration) | Hashes the shop item identifiers so a new rotation can be told apart from the last one shown. |
private async Task<Texture> GetStoreTexture(string path) | Downloads the banner image from a URL; returns null on error. |