VR-Engage  2.3
Loading...
Searching...
No Matches
entityHealthBarOverlay.h
Go to the documentation of this file.
1#pragma once
2
4
5//! \brief Factory type name used to register the health-bar overlay component.
6constexpr const char* DtEntityHealthBarOverlayType = "DtEntityHealthBarOverlay";
7
8//! \brief Example overlay component that augments entity overlays with health values.
10{
11public:
12 //! \brief Initializes the overlay and registers required entity attributes.
13 //! \param player Player station owning this component.
14 //! \param config Role/component configuration table.
15 //! \return True when initialization succeeds.
17
18protected:
19 //! \brief Populates per-entity overlay data with health information.
20 //! \param info Overlay data structure to enrich.
21 //! \param entityRootAttr Root attribute handle for the tracked entity.
22 virtual void populateEntityData(makVre::EntityOverlayInfo& info, makVre::DtAttributeHandle& entityRootAttr) override;
23};
Example overlay component that augments entity overlays with health values.
Definition entityHealthBarOverlay.h:10
virtual void populateEntityData(makVre::EntityOverlayInfo &info, makVre::DtAttributeHandle &entityRootAttr) override
Populates per-entity overlay data with health information.
virtual bool initialize(makVre::DtPlayerStation *player, makVre::DtInitTable &config) override
Initializes the overlay and registers required entity attributes.
Handle class for safe access to attributes.
Definition attributeHandle.h:30
QML overlay component that displays items above tracked entities.
Definition entityOverlayComponent.h:100
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual DtPlayerStation & player()
Gets the player station.
Class for managing the user interface for engaged roles.
Definition playerStation.h:51
constexpr const char * DtEntityHealthBarOverlayType
Factory type name used to register the health-bar overlay component.
Definition entityHealthBarOverlay.h:6
Simple structure to track individual entity overlay information.
Definition entityOverlayComponent.h:47