2022-01-26 07:46:33 +00:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
2022-02-11 09:03:26 +00:00
|
|
|
|
using UnityEngine.SceneManagement;
|
2022-01-26 07:46:33 +00:00
|
|
|
|
|
|
|
|
|
public class InitLogic : MonoBehaviour
|
|
|
|
|
{
|
2022-02-11 09:03:26 +00:00
|
|
|
|
private void Start()
|
2022-01-26 07:46:33 +00:00
|
|
|
|
{
|
2022-03-01 02:55:29 +00:00
|
|
|
|
Application.targetFrameRate = 60;
|
|
|
|
|
|
2022-02-15 10:51:11 +00:00
|
|
|
|
ToukaSDKManager.Instance.initAnalytics();
|
|
|
|
|
ToukaSDKManager.Instance.initAdsSDK();
|
2022-02-15 10:18:44 +00:00
|
|
|
|
|
2022-02-15 11:16:17 +00:00
|
|
|
|
#if UNITY_EDITOR
|
|
|
|
|
EnterGame();
|
|
|
|
|
#elif IOS_CN
|
|
|
|
|
TGTools.Instance.onAgreeHander += ShowAntiAddiction;
|
|
|
|
|
TGTools.Instance.ShowUserAgreementView("卡通剧情", "8");
|
|
|
|
|
#endif
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void ShowAntiAddiction()
|
|
|
|
|
{
|
|
|
|
|
TGTools.Instance.onAgreeHander -= ShowAntiAddiction;
|
2022-02-16 12:09:52 +00:00
|
|
|
|
|
|
|
|
|
ToukaUtils.InitTenjinFirst();
|
2022-02-15 11:16:17 +00:00
|
|
|
|
|
|
|
|
|
if (StaticOnlineParams.IsShowAuthViewOnlineParams.DefaultValue.Equals("1"))
|
|
|
|
|
{
|
|
|
|
|
TGiOSAdManager.Instance.onAntiSuccessHander += AntiSucceed;
|
|
|
|
|
TGiOSAdManager.Instance.ShowAntiView();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
EnterGame();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AntiSucceed()
|
|
|
|
|
{
|
|
|
|
|
TGiOSAdManager.Instance.onAntiSuccessHander -= AntiSucceed;
|
|
|
|
|
EnterGame();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void EnterGame()
|
|
|
|
|
{
|
2022-02-11 09:03:26 +00:00
|
|
|
|
SceneManager.LoadScene("Main");
|
2022-01-26 07:46:33 +00:00
|
|
|
|
}
|
2022-02-11 09:03:26 +00:00
|
|
|
|
}
|