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