IProjectVHeaderPresenter interface
Feeds the top-bar header: currency balances and stamina. Subscribe once when the header is shown and dispose the subscription when it is hidden.
Namespace: SilverTiger.ProjectV.Unity.Presentation.Header
public interface IProjectVHeaderPresenter
Properties​
| Property | Type | Description |
|---|---|---|
Current | ProjectVHeaderSnapshot | The latest header state. Never null; check ProjectVHeaderSnapshot.IsReady before showing it. |
Methods​
SubscribeAsync(Action<ProjectVHeaderSnapshot> listener)​
Calls listener right away with Current, then again with each newer snapshot. Updates may arrive off the Unity main thread; switch to the main thread before touching Unity objects.
Task<IDisposable> SubscribeAsync(Action<ProjectVHeaderSnapshot> listener);
Parameters
| Name | Type | Description |
|---|---|---|
listener | Action<ProjectVHeaderSnapshot> | Called with each snapshot. An exception it throws on a later update is ignored. |
Returns
Task<IDisposable>: A subscription; dispose it to stop receiving updates.
Exceptions
| Exception | When |
|---|---|
ArgumentNullException | listener is null. |
ObjectDisposedException | The presenter was already disposed. |