增加插屏
This commit is contained in:
parent
efb1466a4c
commit
19a5086536
|
|
@ -108,10 +108,28 @@ public partial class JoypacAdManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool switchPageInter = false;
|
||||||
|
|
||||||
|
public bool SwitchPageInter { get { return switchPageInter; } }
|
||||||
|
|
||||||
|
public IEnumerator SwitchPageTime()
|
||||||
|
{
|
||||||
|
switchPageInter = false;
|
||||||
|
yield return new WaitForSeconds(JoypacUtils.OnlineParametersIntByJoypacSDK(StaticOnlineParams.SwitchPage));
|
||||||
|
// Debug.LogError("===========");
|
||||||
|
switchPageInter = true;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void startSwitchPageTime()
|
||||||
|
{
|
||||||
|
StartCoroutine(SwitchPageTime());
|
||||||
|
}
|
||||||
|
|
||||||
public void Init()
|
public void Init()
|
||||||
{
|
{
|
||||||
|
startSwitchPageTime();
|
||||||
LogTool.DebugLog("!!!!init");
|
LogTool.DebugLog("!!!!init");
|
||||||
if (m_initialized) return;
|
if (m_initialized) return;
|
||||||
m_initialized = true;
|
m_initialized = true;
|
||||||
|
|
|
||||||
|
|
@ -43,4 +43,10 @@
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static JoypacOnlineParam LOGSwitch = new JoypacOnlineParam("LOGSwitch", "off");
|
public static JoypacOnlineParam LOGSwitch = new JoypacOnlineParam("LOGSwitch", "off");
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// LOG开关
|
||||||
|
/// </summary>
|
||||||
|
public static JoypacOnlineParam SwitchPage = new JoypacOnlineParam("SwitchPage", "300");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -60,6 +60,10 @@
|
||||||
public const string Leaflets = "Leaflets";
|
public const string Leaflets = "Leaflets";
|
||||||
public const string Coin = "Coin";
|
public const string Coin = "Coin";
|
||||||
public const string VIP = "VIP";
|
public const string VIP = "VIP";
|
||||||
|
|
||||||
|
public const string CookSuccess = "CookSuccess";
|
||||||
|
|
||||||
|
public const string SwitchPage = "SwitchPage";
|
||||||
//public const string SpendCoin = "SpendCoin";
|
//public const string SpendCoin = "SpendCoin";
|
||||||
|
|
||||||
//public const string Noadspage = "Noadspage";
|
//public const string Noadspage = "Noadspage";
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 6.0 KiB |
|
|
@ -108,6 +108,7 @@ public class CookingResult : MonoBehaviour
|
||||||
// ボタン表示
|
// ボタン表示
|
||||||
successAction?.Invoke();
|
successAction?.Invoke();
|
||||||
okButton.gameObject.SetActive(true);
|
okButton.gameObject.SetActive(true);
|
||||||
|
|
||||||
okButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
okButton.OnClickAsObservable().Take(1).Subscribe(_ =>
|
||||||
{
|
{
|
||||||
// 獲得、遷移
|
// 獲得、遷移
|
||||||
|
|
@ -162,6 +163,17 @@ public class CookingResult : MonoBehaviour
|
||||||
GameDataManager.SaveGameData();
|
GameDataManager.SaveGameData();
|
||||||
Market.Instance.IsPause.Value = false;
|
Market.Instance.IsPause.Value = false;
|
||||||
TransitionManager.Instance.LoadScene(GameScenes.Main);
|
TransitionManager.Instance.LoadScene(GameScenes.Main);
|
||||||
|
|
||||||
|
JoypacAnalyticsManager.DesignEvent(StaticStringsEvent.Ad, StaticStringsEvent.Click, StaticStringsEvent.CookSuccess);
|
||||||
|
CryptoPrefs.SetInt("CookSuccess", CryptoPrefs.GetInt("CookSuccess", 0) + 1);
|
||||||
|
if (CryptoPrefs.GetInt("CookSuccess", 0)==2)
|
||||||
|
{
|
||||||
|
JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID, StaticStringsEvent.CookSuccess);
|
||||||
|
// Debug.LogError("jp======Interstitial"+ CryptoPrefs.GetInt("CookSuccess", 0));
|
||||||
|
CryptoPrefs.SetInt("CookSuccess", 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
// もう一度作る
|
// もう一度作る
|
||||||
|
|
@ -221,6 +233,11 @@ public class CookingResult : MonoBehaviour
|
||||||
perfectButton.gameObject.SetActive(cornResult != CornResult.Perfect);
|
perfectButton.gameObject.SetActive(cornResult != CornResult.Perfect);
|
||||||
destructionButton.gameObject.SetActive(cornResult == CornResult.Failure);
|
destructionButton.gameObject.SetActive(cornResult == CornResult.Failure);
|
||||||
okButton.gameObject.SetActive(cornResult != CornResult.Failure);
|
okButton.gameObject.SetActive(cornResult != CornResult.Failure);
|
||||||
|
if (cornResult != CornResult.Failure)
|
||||||
|
{
|
||||||
|
JoypacAnalyticsManager.DesignEvent(StaticStringsEvent.Ad, StaticStringsEvent.Impression, StaticStringsEvent.CookSuccess);
|
||||||
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,5 +38,15 @@ public class FooterManager : MonoBehaviour
|
||||||
}).AddTo(this);
|
}).AddTo(this);
|
||||||
|
|
||||||
stockNotifyIcon.SetActive(Shopping.CheckEarnedRecipe());
|
stockNotifyIcon.SetActive(Shopping.CheckEarnedRecipe());
|
||||||
|
if (JoypacAdManager.Instance.SwitchPageInter)
|
||||||
|
{
|
||||||
|
JoypacAdManager.Instance.ShowInterstitial(null, ConstStringKey.JOYPAC_SDK_INTERID, StaticStringsEvent.SwitchPage);
|
||||||
|
Debug.Log("jp======Interstitial");
|
||||||
|
|
||||||
|
// StartCoroutine(JoypacAdManager.Instance.SwitchPageTime());
|
||||||
|
|
||||||
|
JoypacAdManager.Instance.startSwitchPageTime();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -168,7 +168,6 @@ MonoBehaviour:
|
||||||
VerboseLogBuild: 0
|
VerboseLogBuild: 0
|
||||||
UseManualSessionHandling: 0
|
UseManualSessionHandling: 0
|
||||||
SendExampleGameDataToMyGame: 0
|
SendExampleGameDataToMyGame: 0
|
||||||
UseIMEI: 0
|
|
||||||
InternetConnectivity: 0
|
InternetConnectivity: 0
|
||||||
CustomDimensions01: []
|
CustomDimensions01: []
|
||||||
CustomDimensions02: []
|
CustomDimensions02: []
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue