Rewarded ad debug
This commit is contained in:
@@ -125,6 +125,7 @@ public class AdsManager : MonoBehaviour
|
||||
|
||||
private void OnRewardSuccess(AdValue obj)
|
||||
{
|
||||
Debug.Log("Rewarded Ad success, code:1032");
|
||||
GameManager.AdWatched();
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ using UnityEngine;
|
||||
using UnityEngine.Networking;
|
||||
|
||||
public static class DataManager{
|
||||
public const string API_ENDPOINT = "http://vps.playpoolstudios.com/faucet/golf/api/";
|
||||
public const string API_ENDPOINT = "https://vps.playpoolstudios.com/faucet/golf/api/";
|
||||
public const string key = "#2CuV1Bit^S!sW1ZcgRv8BhrO";
|
||||
public static UserData userData{get; private set;}
|
||||
public static List<LeaderboardItemData> Leaderboard{get; private set;}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
@@ -253,16 +254,20 @@ public class GameManager : MonoBehaviour
|
||||
}
|
||||
|
||||
public void WatchAd(){
|
||||
#if UNITY_EDITOR
|
||||
AdWatched();
|
||||
#else
|
||||
AdsManager.instance.ShowRewardedAd();
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void AdWatched(){
|
||||
try{
|
||||
instance.GameOverUI.SetActive(false);
|
||||
instance.CurStrokes= (int)((float)instance.MaxStrokes/2f);
|
||||
}catch{
|
||||
|
||||
}catch(Exception e){
|
||||
Debug.LogError("Error giving rewarded strokes, code:1038");
|
||||
Debug.LogError(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user