SusFloatingDamage

Ephemeral floating number (−damage / +heal) that animates up and self-removes after ~1.2s.
Package
SusKit · World (commercial)
Props
| Name | Type | Default | |
|---|---|---|---|
Damage | Prop<int> | 0 | |
IsCritical | Prop<bool> | false | |
IsHeal | Prop<bool> | false |
Slots
No slots.
Events
No public events.
Style hooks
USS class contract — override appearance without touching C#. States toggle via these classes:
fd-labelsus-floating-damagesus-floating-damage--critsus-floating-damage--defaultsus-floating-damage--heal
Usage
Spawn a fresh instance per hit — the element removes itself when the animation ends.
csharp
var dmg = new SusFloatingDamage();
dmg.Damage.Value = 128;
dmg.IsCritical.Value = true;
dmg.IsHeal.Value = false;
host.Add(dmg);xml
<template>
<sus:SusFloatingDamage :Damage="Amount.Value"
:IsCritical="Critical.Value"
:IsHeal="Heal.Value" />
</template>
<script>
public Prop<int> Amount = new(128);
public Prop<bool> Critical = new(true);
public Prop<bool> Heal = new(false);
</script>| Prop | Role |
|---|---|
Damage | Absolute amount shown (0 skips paint) |
IsCritical | Crit styling (ignored when heal) |
IsHeal | + prefix + heal class |
Notes
- Label text is
-N(damage) or+N(heal); magnitude fromMath.Abs(Damage). - After the animation the element calls
RemoveFromHierarchy— recreate for the next hit (Storybook uses loop + Replay). - Pair with world-space hosts / markers when floating over a unit.