Table of Contents

Class UITKStaminaBar

Namespace
FishMMO.Client
Assembly
FishMMO.Client.dll

UI Toolkit stamina bar. Inherits resource bar logic from UITKResourceBar, and carries the breath meter: a thin bar along its top edge, shown while the character holds its breath under water and until the breath is full again.

public class UITKStaminaBar : UITKResourceBar
Inheritance
Object
Component
Behaviour
MonoBehaviour
UITKStaminaBar
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.destroyCancellationToken
MonoBehaviour.useGUILayout
MonoBehaviour.didStart
MonoBehaviour.didAwake
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.GetComponentIndex()
Component.CompareTag(TagHandle)
Component.transform
Component.transformHandle
Component.gameObject
Component.tag
Object.GetEntityId()
Object.MemberwiseClone()
Object.GetInstanceID()
Object.GetHashCode()
Object.InstantiateAsync<T>(T)
Object.InstantiateAsync<T>(T, Transform)
Object.InstantiateAsync<T>(T, Vector3, Quaternion)
Object.InstantiateAsync<T>(T, Transform, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Scene)
Object.Instantiate<T>(T, InstantiateParameters)
Object.Instantiate<T>(T, Vector3, Quaternion, InstantiateParameters)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.FindObjectsByType<T>()
Object.FindObjectsByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags

Remarks

On the stamina bar rather than a panel of its own because each HUD panel is its own scene document: the meter rides this one, drags with it, and needs nothing added to a scene. It reads BreathSeconds, which is predicted, so it runs smoothly.

Properties

FillModifierClass

USS modifier class applied to the fill element to colour this bar (e.g. "fish-bar__fill--hp"). Supplied by the concrete subclass.

protected override string FillModifierClass { get; }

Property Value

string

RootModifierClass

USS modifier class applied to the bar root to place it on screen (e.g. "res-bar--hp"). Supplied by the concrete subclass.

protected override string RootModifierClass { get; }

Property Value

string

Remarks

Each bar owns a separate UnityEngine.UIElements.UIDocument, so the three of them cannot be laid out relative to one another by a shared container — every panel root fills the screen independently. Without a per-bar anchor they all resolve to the same strip and draw on top of each other, leaving only whichever panel sorts last visible.

RowSlot

This bar's place in the default row: -1 left of centre, 0 centred, +1 right of centre.

protected override int RowSlot { get; }

Property Value

int

Methods

OnStarting()

Queries the fill and label elements and applies the colour modifier class.

public override void OnStarting()

OnTick()

Smoothly interpolates the fill width toward the target value each frame.

protected override void OnTick()

Remarks

This was private void Update(). UITKControl declares its own Update and Unity binds only the MOST DERIVED one, so a second Update in a subclass silently disables PollLoseFocus and OnTick for the whole panel — the failure the base class's own comment warns about, and it was live on all three resource bars.