PlayerHud
Use these methods to change the player HUD.
Static members
Member |
Description |
---|---|
|
Controls visibility of the game mode hud. |
|
Controls visibility of the player hud. |
|
Controls the Killed By sequence. |
|
The current player squad order state. |
|
The elements shown on the left side of the player hud. |
|
The elements shown on the right side of the player hud. |
Static methods
Method |
Description |
---|---|
|
Clamps the tracked element to the screen inside a border of size clampSize in pixels. |
Controls visibility of individual UI elements of the player hud. |
|
|
Makes the rectElement automatically follow the transform position. |
|
Makes the rectElement automatically follow the actor. |
|
Makes the rectElement automatically follow the worldPosition. |
|
Makes the rectElement automatically follow the transform position with an offset. |
|
Makes the rectElement automatically follow the actor with a world offset. |
Removes tracking from the specified tracking ID. Returns true on successful removal. |
|
Controls visibility of individual UI elements of the player hud. |
Details
-
class PlayerHud
-
static bool hudGameModeEnabled
Controls visibility of the game mode hud.
-
static bool hudPlayerEnabled
Controls visibility of the player hud.
-
static bool killCameraEnabled
Controls the Killed By sequence.
-
static const PlayerOrderState playerOrderState
The current player squad order state. This value is used to display the state info text label in the HUD
- static const array<UIElement> uiElementsLeft
The elements shown on the left side of the player hud.
- static const array<UIElement> uiElementsRight
The elements shown on the right side of the player hud.
-
static void ClampElementTracking(int id, float clampSize, GameObject activateWhenClamped, GameObject deactivateWhenClamped)
Clamps the tracked element to the screen inside a border of size clampSize in pixels.
-
static void HideUIElement(UIElement element)
Controls visibility of individual UI elements of the player hud.
-
static int RegisterElementTracking(Transform transform, RectTransform rectElement, GameObject activateWhenVisible)
Makes the rectElement automatically follow the transform position. This is done by modifying the anchoredPosition value of the Rect Transform. Please make sure that the rectElement is a child to a canvas object, and that its Anchor Min/Max values are set to 0. Returns the tracker ID.
-
static int RegisterElementTracking(Actor actor, RectTransform rectElement, GameObject activateWhenVisible)
Makes the rectElement automatically follow the actor.
-
static int RegisterElementTracking(Vector3 worldPosition, RectTransform rectElement, GameObject activateWhenVisible)
Makes the rectElement automatically follow the worldPosition.
-
static int RegisterElementTracking(Transform transform, Vector3 localOffset, RectTransform rectElement, GameObject activateWhenVisible)
Makes the rectElement automatically follow the transform position with an offset.
-
static int RegisterElementTracking(Actor actor, Vector3 worldOffset, RectTransform rectElement, GameObject activateWhenVisible)
Makes the rectElement automatically follow the actor with a world offset.
-
static bool RemoveElementTracking(int id)
Removes tracking from the specified tracking ID. Returns true on successful removal.
-
static bool hudGameModeEnabled