ExpenditureEffect
Overview
Shows a brief -Cost$ popup using a DOTweenAnimation when an Upgrade is purchased.
Serialized
- UpgradeEvent
upgradePurchasedEvent - DOTweenAnimation
tween - TextMeshProUGUI
text
Behavior
- Start() → register to event, set initial alpha to 0.
- OnUpgradePurchased(Upgrade u) → set text to
"-{u.cost}$", set alpha to 1,DORestart()andDOPlay()the tween. - OnDestroy() → unregister.