ShowNames.NameBoardHandler
A private class in Root.Township, Alta.QuickAccessActions. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.
Tracks the name board for one player or PlayerProxy while Show Names is on: spawns it (after a short delay unless instant), keeps it above the head and facing you, and updates friend status. Client only.
Constructors
1 private and internal constructor
| Member | What it is |
|---|
private NameBoardHandler(string userName, int userStatus, bool isFriend, Transform playerHead, ShowNames settings) | Creates a ShowNames.NameBoardHandler from userName, userStatus, isFriend, playerHead and settings. |
Fields
10 private and internal fields
| Member | What it is |
|---|
private Transform boardTransform | Transform of the spawned name board. |
private AltaCoroutine delayToActivate | Coroutine for the delayed spawn, cleared once the board spawns. |
private bool hasSpawned | True once the board has been taken from the pool. |
private bool isFriend | Whether the player was a friend when the handler was made. |
private NameBoard nameBoard | The spawned name board. |
private Player player | The real player, or null for a PlayerProxy. |
private Transform playerHead | Head transform the board follows. |
private ShowNames settings | The ShowNames action that owns this handler. |
private string userName | Name shown on the board. |
private int userStatus | Member status as an int, used to pick the shield. |
Methods
| Member | What it is |
|---|
void Close() | Releases the board, or stops the pending spawn, and unhooks the friendship event. |
void Update(Vector3 toPlayer) | Moves the board above the player's head and turns it to face the local player, ignoring height. |
3 private and internal methods
| Member | What it is |
|---|
private void Activate() | Takes a NameBoard from the pool and sets it up with the name, friend state and member status shield. |
private IEnumerator DelayToActivateName() (iterator) | Coroutine that waits delayToActivateName seconds, then calls Activate. |
private void UpdateFriendship() | Updates the board when the player's friendship status changes. |
Used in
Members of other types that take, return or hold a NameBoardHandler: