Use hooks instead of lifecycle for NamePlateGui (#2060)

This commit is contained in:
nebel 2024-11-04 23:21:07 +09:00 committed by GitHub
parent f3bd83fbe9
commit 9a0bc50e23
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 244 additions and 66 deletions

View file

@ -26,6 +26,15 @@ public interface INamePlateGui
/// </remarks>
event OnPlateUpdateDelegate? OnNamePlateUpdate;
/// <summary>
/// An event which fires after nameplate data is updated and at least one nameplate had important updates. The
/// subscriber is provided with a list of handlers for nameplates with important updates.
/// </summary>
/// <remarks>
/// Fires before <see cref="OnPostDataUpdate"/>.
/// </remarks>
event OnPlateUpdateDelegate? OnPostNamePlateUpdate;
/// <summary>
/// An event which fires when nameplate data is updated. The subscriber is provided with a list of handlers for all
/// nameplates.
@ -36,6 +45,16 @@ public interface INamePlateGui
/// </remarks>
event OnPlateUpdateDelegate? OnDataUpdate;
/// <summary>
/// An event which fires after nameplate data is updated. The subscriber is provided with a list of handlers for all
/// nameplates.
/// </summary>
/// <remarks>
/// This event is likely to fire every frame even when no nameplates are actually updated, so in most cases
/// <see cref="OnNamePlateUpdate"/> is preferred. Fires after <see cref="OnPostNamePlateUpdate"/>.
/// </remarks>
event OnPlateUpdateDelegate? OnPostDataUpdate;
/// <summary>
/// Requests that all nameplates should be redrawn on the following frame.
/// </summary>