#include <EnemyWorldHealthBar.hpp>
◆ EnemyWorldHealthBar()
| EnemyWorldHealthBar::EnemyWorldHealthBar |
( |
| ) |
|
◆ draw()
| void EnemyWorldHealthBar::draw |
( |
HudContext & | ctx, |
|
|
float | drawX, |
|
|
float | drawY ) |
|
overridevirtual |
Emit geometry into the draw context.
- Parameters
-
| ctx | Immediate-mode draw API. |
| drawX | Resolved pixel X (anchor + offset already applied). |
| drawY | Resolved pixel Y. |
Implements HudWidget.
◆ update()
Called each frame before draw(). Update animation, consume events.
Implements HudWidget.
◆ barWidth
| float EnemyWorldHealthBar::barWidth = 80.f |
Shorter than v1 — design feedback wanted compact bars.
◆ enemies_
| std::unordered_map<std::string, EnemyState> EnemyWorldHealthBar::enemies_ |
|
private |
Per-enemy state keyed by name (stable across frames).
Held across frames so ghost trails persist between updates.
◆ fadeOutSecs
| float EnemyWorldHealthBar::fadeOutSecs = 0.5f |
Final fade-out length appended to the visibility window.
◆ fontSize
| float EnemyWorldHealthBar::fontSize = 10.f |
◆ healthHeight
| float EnemyWorldHealthBar::healthHeight = 5.f |
◆ screenH_
| float EnemyWorldHealthBar::screenH_ = 720.f |
|
private |
◆ screenW_
| float EnemyWorldHealthBar::screenW_ = 1280.f |
|
private |
◆ shieldHeight
| float EnemyWorldHealthBar::shieldHeight = 3.f |
◆ showAfterDamageSecs
| float EnemyWorldHealthBar::showAfterDamageSecs = 4.f |
Window after the most recent hit during which the bar stays visible.
◆ viewProj_
| glm::mat4 EnemyWorldHealthBar::viewProj_ {1.f} |
|
private |
◆ yOffsetPx
| float EnemyWorldHealthBar::yOffsetPx = 14.f |
Pixels above the projected world point.
The documentation for this struct was generated from the following files: