Ad frequency reduced
This commit is contained in:
@@ -28,6 +28,7 @@ public class ColorbookFlowController : IAsyncStartable, IDisposable
|
||||
private IDisposable _selectedSub;
|
||||
private IDisposable _returnToMainMenuSubscription;
|
||||
private bool _navigatingToGameplay;
|
||||
private int _selectCount;
|
||||
private CancellationTokenSource _scopeCts;
|
||||
|
||||
public ColorbookFlowController(
|
||||
@@ -110,9 +111,14 @@ public class ColorbookFlowController : IAsyncStartable, IDisposable
|
||||
_loadingScreen.Show();
|
||||
_loadingScreen.SetProgress(0f);
|
||||
|
||||
// Fire the interstitial but never await it: the ad overlays the transition while the level
|
||||
// loads underneath, so a missed/dropped ad callback can't stall the flow at 0% anymore.
|
||||
ShowInterstitialAdAsync(ct).Forget();
|
||||
// Frequency cap: show an interstitial on every 2nd level open (2nd, 4th, ...). On skip turns
|
||||
// just keep one prewarmed so the next show has an ad ready. Fire-and-forget either way — the
|
||||
// ad overlays the transition while the level loads underneath, so a missed/dropped ad callback
|
||||
// can't stall the flow at 0% anymore.
|
||||
if (++_selectCount % 2 == 0)
|
||||
ShowInterstitialAdAsync(ct).Forget();
|
||||
else
|
||||
PrewarmInterstitialAdAsync(ct).Forget();
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user