Skip to main content

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​

PropertyTypeDescription
CurrentProjectVHeaderSnapshotThe 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

NameTypeDescription
listenerAction<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

ExceptionWhen
ArgumentNullExceptionlistener is null.
ObjectDisposedExceptionThe presenter was already disposed.