dopamine effects

This commit is contained in:
Michal Vrba
2026-08-28 16:57:34 +02:00
parent 02bca7c34a
commit 16bc48ab34
5 changed files with 489 additions and 8 deletions
+48
View File
@@ -114,9 +114,57 @@ public class FxService
catch { }
}
public async ValueTask PlaySelectStepAsync(int step)
{
try { await _js.InvokeVoidAsync("FaraonFx.playSelectStep", step); } catch { }
}
public async ValueTask TriggerComboSlamAsync(int count, string title, string sub = "")
{
try
{
string type = count >= 4 ? "quad" : (count == 3 ? "triple" : "double");
await _js.InvokeVoidAsync("FaraonFx.triggerDopamineBanner", title, sub, type);
}
catch { }
}
public async ValueTask TriggerFreezeEffectAsync()
{
try
{
await _js.InvokeVoidAsync("FaraonFx.triggerDopamineBanner", "❄️ ZMRAZENÝ!", "Stojíš jedno kolo", "freeze");
}
catch { }
}
public async ValueTask TriggerReviveEffectAsync(string playerName)
{
try
{
await _js.InvokeVoidAsync("FaraonFx.triggerDopamineBanner", "⚡ VSTÁVAJ Z MŔTVYCH!", $"{playerName} je späť v hre!", "revive");
}
catch { }
}
public async ValueTask TriggerJackpotWinAsync(string winnerName)
{
try
{
await _js.InvokeVoidAsync("FaraonFx.triggerDopamineBanner", "🏆 FARAÓN!", $"{winnerName} vyhráva hru!", "jackpot");
}
catch { }
}
public async ValueTask TriggerDopamineBannerAsync(string title, string subtitle, string type)
{
try { await _js.InvokeVoidAsync("FaraonFx.triggerDopamineBanner", title, subtitle, type); } catch { }
}
public async ValueTask<bool> ToggleMuteAsync()
{
try { return await _js.InvokeAsync<bool>("FaraonFx.toggleMute"); } catch { return false; }
}
}