mirror of
https://github.com/Kelsidavis/WoWee.git
synced 2026-04-05 04:33:51 +00:00
Add level-up ding animation with cheer emote and test button
- Trigger ding when UNIT_FIELD_LEVEL increases for player: plays LevelUp sound, cheer emote animation, and shows screen overlay - renderDingEffect(): 3 expanding golden rings + "LEVEL X!" / "DING!" text drawn via ImDrawList foreground (3s duration, fades out last 0.8s) - triggerDing() wires sound (UiSoundManager::playLevelUp) + emote + overlay - LevelUpCallback in GameHandler fires on genuine level increase (newLevel > oldLevel) - "Test: Level Up" button in escape menu triggers ding at current player level
This commit is contained in:
parent
eebc0007a6
commit
897867bf7b
5 changed files with 121 additions and 0 deletions
|
|
@ -276,6 +276,15 @@ private:
|
|||
// Left-click targeting: distinguish click from camera drag
|
||||
glm::vec2 leftClickPressPos_ = glm::vec2(0.0f);
|
||||
bool leftClickWasPress_ = false;
|
||||
|
||||
// Level-up ding animation
|
||||
static constexpr float DING_DURATION = 3.0f;
|
||||
float dingTimer_ = 0.0f;
|
||||
uint32_t dingLevel_ = 0;
|
||||
void renderDingEffect();
|
||||
|
||||
public:
|
||||
void triggerDing(uint32_t newLevel);
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue