Rewarded ad debug
This commit is contained in:
parent
3f90e12cfe
commit
07f04580b7
6
.vsconfig
Normal file
6
.vsconfig
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"version": "1.0",
|
||||
"components": [
|
||||
"Microsoft.VisualStudio.Workload.ManagedGame"
|
||||
]
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: b725737a4b9f04575bdeb0f9ef00ebc1
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 6a8fdd93aa77347e3b4f457596907088
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 82f7c1592c47c4258afcde1c20a4779a
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
16
ProjectSettings/TimelineSettings.asset
Normal file
16
ProjectSettings/TimelineSettings.asset
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!114 &1
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 53
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 0}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
assetDefaultFramerate: 60
|
||||
m_DefaultFrameRate: 60
|
||||
Loading…
Reference in New Issue
Block a user