Class UnityHudSegmentedRepresentation
Draws the value as a fixed row of discrete pips — the life strip of an arcade shooter — where the row length is the capacity and the filled count is the value.
Implements
Inherited Members
Namespace: Serenity.GameUi.Infrastructure.Representations
Assembly: Serenity.UnityGameUi.Infrastructure.dll
Syntax
public sealed class UnityHudSegmentedRepresentation : UnityHudRepresentation, IHudRepresentation
Remarks
Unlike a stack, the row never collapses and the spent pips always stay visible: the point of a segmented display is that the player can see how much is missing at a glance.
Constructors
UnityHudSegmentedRepresentation()
Declaration
public UnityHudSegmentedRepresentation()
Properties
HasThemedChrome
Whether this representation has chrome a theme could contribute to, so the builder only offers the choice where it changes anything.
Declaration
public override bool HasThemedChrome { get; }
Property Value
| Type | Description |
|---|---|
| bool |
Overrides
Kind
Declaration
public override HudRepresentationKind Kind { get; }
Property Value
| Type | Description |
|---|---|
| HudRepresentationKind |
Overrides
Methods
CreateRenderer()
Creates the object that builds and drives this representation's visuals.
Declaration
public override IHudRepresentationRenderer CreateRenderer()
Returns
| Type | Description |
|---|---|
| IHudRepresentationRenderer | A renderer bound to this configuration. |
Overrides
SetSprites(Sprite, Sprite)
Sets the sprites. Used by the builder tool.
Declaration
public void SetSprites(Sprite filled, Sprite empty)
Parameters
| Type | Name | Description |
|---|---|---|
| Sprite | filled | Sprite for a filled segment. |
| Sprite | empty | Sprite for an empty segment. |