Skip to main content

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​

MemberWhat it is
NameBoardHandler(Player player, ShowNames settings)Creates a ShowNames.NameBoardHandler from userName, userStatus, isFriend, playerHead and settings.
NameBoardHandler(PlayerProxy player, ShowNames settings)Creates a ShowNames.NameBoardHandler from userName, userStatus, isFriend, playerHead and settings.
1 private and internal constructor
MemberWhat 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
MemberWhat it is
private Transform boardTransformTransform of the spawned name board.
private AltaCoroutine delayToActivateCoroutine for the delayed spawn, cleared once the board spawns.
private bool hasSpawnedTrue once the board has been taken from the pool.
private bool isFriendWhether the player was a friend when the handler was made.
private NameBoard nameBoardThe spawned name board.
private Player playerThe real player, or null for a PlayerProxy.
private Transform playerHeadHead transform the board follows.
private ShowNames settingsThe ShowNames action that owns this handler.
private string userNameName shown on the board.
private int userStatusMember status as an int, used to pick the shield.

Methods​

MemberWhat 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
MemberWhat 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: