Skip to content

DamageMeterUI ​

Inherits: HUDUIElement < Control

This class manages the display of detailed combat statistics, including damage and healing done by each entity.

Description ​

Key features:

  • Tracks and displays damage and healing statistics for each entity
  • Dynamically creates and updates detail bars for each active entity
  • Calculates and displays percentages of total damage/healing for each entity
  • Sorts detail bars based on total amount (highest to lowest)

Properties ​

PackedScenedamage_bar

Variables ​

intgroup_total_damage
intgroup_total_healing
Array[DamaterBarUI]active_damage_bars[]
Array[DamaterBarUI]active_healing_bars[]
intcurrent_window0

Methods ​

voidinitialize_ui( system_hub: GameHost.SystemHub )

Property descriptions ​

PackedScene damage_bar ​

Preloaded scene for individual detail bars

Variable descriptions ​

int group_total_damage ​

Total damage done by the group

int group_total_healing ​

Total healing done by the group

Array[DamaterBarUI] active_damage_bars = [] ​

Array of active damage detail bars

Array[DamaterBarUI] active_healing_bars = [] ​

Array of active healing detail bars

int current_window = 0 ​

Currently open tab (0 for damage, 1 for healing)

Method descriptions ​

void initialize_ui( system_hub: GameHost.SystemHub ) ​

Called when the node enters the scene tree for the first time