feat(engine,server): XP toast on win + display_name max-length validation
ProgressPlugin now fires XpAwardedEvent on every win. AnimationPlugin shows a "+N XP" toast so players see XP feedback immediately after winning. Server leaderboard opt-in endpoint also now validates that display_name is at most 32 characters. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -80,3 +80,10 @@ pub struct NewGameConfirmEvent;
|
||||
/// a short string to the player, e.g. "Locked — reach level 5".
|
||||
#[derive(Event, Debug, Clone)]
|
||||
pub struct InfoToastEvent(pub String);
|
||||
|
||||
/// Fired by `ProgressPlugin` immediately after awarding XP for a win so the
|
||||
/// animation layer can display a "+N XP" toast alongside the win cascade.
|
||||
#[derive(Event, Debug, Clone, Copy)]
|
||||
pub struct XpAwardedEvent {
|
||||
pub amount: u64,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user