ShowNames
A class in Root.Township, Alta.QuickAccessActions.
Client: the quick access action that shows name boards above nearby players and player proxies. Names hide after a few seconds unless the player names toggle setting is on.
- Listed in Players and characters
- Inherits or implements
QuickAccessMenuAction - Nested types
NameBoardHandler - Attributes
CreateAssetMenu
Constructors
| Member | What it is |
|---|---|
ShowNames() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
9 private and internal fields
| Member | What it is |
|---|---|
private Dictionary<NetworkEntity, ShowNames.NameBoardHandler> activeNames | Name board handlers by player entity. |
private float delayToActivateName | Delay before a newly in-range player's name appears. |
private Timeline.IEntry entry | Timeline entry that hides the names. |
private float fadeAfter | Seconds names stay before hiding. |
private bool isActive | Backing field for IsActive. |
private bool isInstant | Set during the first update so names shown at activation skip the delay. |
private float maxDistanceToShowNamesSquared | Squared distance within which names show. |
private NameBoardsSettings nameBoardSettings | Global name board settings, fetched on activation. |
private IUnityUpdateMethod update | Handle for the registered update. |
Properties
| Member | What it is |
|---|---|
override bool IsActive { get; } | Whether names are showing. |
override bool IsValid { get; } | False while the local player is downed. |
Methods
| Member | What it is |
|---|---|
void DeathRun() | Shows names without a timer while the local player is dead; they hide when the player entity goes. |
override void Run(Controller controller) | Toggles names on or off from the quick access menu. |
5 private and internal methods
| Member | What it is |
|---|---|
private void Activate(bool isUsingTimer) | Shows names now and keeps them updated, and starts the hide timer if asked and the toggle setting is off. |
private void ClearPlayer(NetworkEntity entity, bool isUnload) | Removes the name board for one player. |
private void Deactivate() | Removes every name board and stops updating. |
private void DeactivateNames(NetworkEntity entity, bool isUnload) | Hides names when the local player's entity is destroyed. |
private void Update() | Adds, moves or removes name boards by each player's distance and whether they show their name. |
Used in
Members of other types that take, return or hold a ShowNames: