Skip to content

Commit

Permalink
Ready to build v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
FarukKayaduman committed May 9, 2023
1 parent 5713987 commit fb166ce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
29 changes: 12 additions & 17 deletions Assets/Scripts/GoogleAdMobController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public void LoadInterstitialAd()
_interstitialAd = null;
}

Debug.Log("Loading the interstitial ad.");
// Debug.Log("Loading the interstitial ad.");

// create our request used to load the ad.
var adRequest = new AdRequest.Builder().Build();
Expand All @@ -62,13 +62,11 @@ public void LoadInterstitialAd()
// if error is not null, the load request failed.
if (error != null || ad == null)
{
Debug.LogError("interstitial ad failed to load an ad " +
"with error : " + error);
// Debug.LogError("interstitial ad failed to load an ad " + "with error : " + error);
return;
}

Debug.Log("Interstitial ad loaded with response : "
+ ad.GetResponseInfo());
// Debug.Log("Interstitial ad loaded with response : " + ad.GetResponseInfo());

_interstitialAd = ad;
RegisterEventHandlers(_interstitialAd);
Expand All @@ -82,18 +80,18 @@ public void ShowInterstitialAd()
{
if (_interstitialAdTimer < _adCooldownSecond)
{
Debug.LogError("On cooldown for interstitial ad.");
// Debug.LogError("On cooldown for interstitial ad.");
return;
}

if (_interstitialAd != null && _interstitialAd.CanShowAd())
{
Debug.Log("Showing interstitial ad.");
// Debug.Log("Showing interstitial ad.");
_interstitialAd.Show();
}
else
{
Debug.LogError("Interstitial ad is not ready yet.");
// Debug.LogError("Interstitial ad is not ready yet.");
}
}

Expand All @@ -102,36 +100,33 @@ private void RegisterEventHandlers(InterstitialAd ad)
// Raised when the ad is estimated to have earned money.
ad.OnAdPaid += (AdValue adValue) =>
{
Debug.Log(String.Format("Interstitial ad paid {0} {1}.",
adValue.Value,
adValue.CurrencyCode));
// Debug.Log(String.Format("Interstitial ad paid {0} {1}.", adValue.Value, adValue.CurrencyCode));
};
// Raised when an impression is recorded for an ad.
ad.OnAdImpressionRecorded += () =>
{
Debug.Log("Interstitial ad recorded an impression.");
// Debug.Log("Interstitial ad recorded an impression.");
};
// Raised when a click is recorded for an ad.
ad.OnAdClicked += () =>
{
Debug.Log("Interstitial ad was clicked.");
// Debug.Log("Interstitial ad was clicked.");
};
// Raised when an ad opened full screen content.
ad.OnAdFullScreenContentOpened += () =>
{
Debug.Log("Interstitial ad full screen content opened.");
// Debug.Log("Interstitial ad full screen content opened.");
};
// Raised when the ad closed full screen content.
ad.OnAdFullScreenContentClosed += () =>
{
Debug.Log("Interstitial ad full screen content closed.");
// Debug.Log("Interstitial ad full screen content closed.");
LoadInterstitialAd();
};
// Raised when the ad failed to open full screen content.
ad.OnAdFullScreenContentFailed += (AdError error) =>
{
Debug.LogError("Interstitial ad failed to open full screen content " +
"with error : " + error);
// Debug.LogError("Interstitial ad failed to open full screen content with error : " + error);
LoadInterstitialAd();
};
}
Expand Down
6 changes: 3 additions & 3 deletions ProjectSettings/ProjectSettings.asset
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ PlayerSettings:
16:10: 1
16:9: 1
Others: 1
bundleVersion: 0.3.0
bundleVersion: 0.4.0
preloadedAssets: []
metroInputSource: 0
wsaTransparentSwapchain: 0
Expand Down Expand Up @@ -167,7 +167,7 @@ PlayerSettings:
iPhone: 0
tvOS: 0
overrideDefaultApplicationIdentifier: 1
AndroidBundleVersionCode: 3
AndroidBundleVersionCode: 4
AndroidMinSdkVersion: 22
AndroidTargetSdkVersion: 33
AndroidPreferredInstallLocation: 1
Expand Down Expand Up @@ -271,7 +271,7 @@ PlayerSettings:
androidGamepadSupportLevel: 1
chromeosInputEmulation: 1
AndroidMinifyWithR8: 0
AndroidMinifyRelease: 1
AndroidMinifyRelease: 0
AndroidMinifyDebug: 0
AndroidValidateAppBundleSize: 1
AndroidAppBundleSizeToValidate: 150
Expand Down

0 comments on commit fb166ce

Please sign in to comment.