LivesBindingComponent Class
Binds a UI entity to the LivesComponent of a target entity. More...
Declaration
Public Constructors Index
| LivesBindingComponent (EntityHandle target) | |
|
Constructs a LivesBindingComponent. More... | |
Public Member Functions Index
| EntityHandle | target () const noexcept |
|
Returns the observed entity handle. More... | |
| void | setLivesRevision (const LivesRevision livesRevision) noexcept |
|
Updates the stored lives revision. More... | |
| LivesRevision | livesRevision () const noexcept |
|
Returns the stored lives revision. More... | |
Private Member Attributes Index
| EntityHandle | entityHandle_ |
|
Handle of the entity whose lives are observed. More... | |
| LivesRevision | livesRevision_ |
|
Last-seen lives revision for change detection. More... | |
Description
Binds a UI entity to the LivesComponent of a target entity.
Stores the target EntityHandle and a local LivesRevision snapshot. Observer systems compare the stored revision against the target's LivesComponent revision to detect changes and update the UI.
Definition at line 26 of file LivesBindingComponent.ixx.
Public Constructors
LivesBindingComponent()
| inline |
Constructs a LivesBindingComponent.
- Parameters
-
target Handle of the entity to observe.
Definition at line 47 of file LivesBindingComponent.ixx.
Reference target.
Public Member Functions
livesRevision()
| inline nodiscard noexcept |
Returns the stored lives revision.
- Returns
The current LivesRevision snapshot.
Definition at line 72 of file LivesBindingComponent.ixx.
Referenced by setLivesRevision.
setLivesRevision()
| inline noexcept |
Updates the stored lives revision.
- Parameters
-
livesRevision New revision value.
Definition at line 63 of file LivesBindingComponent.ixx.
Reference livesRevision.
target()
| inline nodiscard noexcept |
Returns the observed entity handle.
- Returns
The target EntityHandle.
Definition at line 54 of file LivesBindingComponent.ixx.
Referenced by LivesBindingComponent.
Private Member Attributes
entityHandle_
|
Handle of the entity whose lives are observed.
Definition at line 33 of file LivesBindingComponent.ixx.
livesRevision_
|
Last-seen lives revision for change detection.
Definition at line 38 of file LivesBindingComponent.ixx.
The documentation for this class was generated from the following file:
Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.