fix:1、删除sdk相关。2、添加tips界面,修复bug

This commit is contained in:
2026-06-17 14:45:28 +08:00
parent 19efcb09fa
commit acf888d9be
1099 changed files with 127081 additions and 74087 deletions
+70 -71
View File
@@ -1,10 +1,9 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using AppsFlyerSDK;
// using AppsFlyerSDK;
using DG.Tweening;
using IgnoreOPS;
using RgfCDfHLhn9WSDK;
using SGModule.Net;
using SGModule.NetKit;
using UnityEngine;
@@ -35,52 +34,52 @@ namespace ChillConnect
public static void Init()
{
#if !UNITY_EDITOR
// 注册 ab事件,0或1,0为自然量版本,1为激励版本
RgfCDfHLhn9WSDK_Utility.Instance.RegistIosParam(i =>
{
SuperApplication.Instance.attribution = i == 0 ? "organic" : "non_organic";
Debug.Log($"ios ab param : {i} attribution=== {SuperApplication.Instance.attribution}");
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
});
void GameConfig(bool result, string config)
{
Debug.Log($"************* game config result : {result}, config : {config}");
}
// SDK初始化方法
RgfCDfHLhn9WSDK_Utility.Instance.Init(null, null, GameConfig);
// // 注册 ab事件,0或1,0为自然量版本,1为激励版本
// RgfCDfHLhn9WSDK_Utility.Instance.RegistIosParam(i =>
// {
// SuperApplication.Instance.attribution = i == 0 ? "organic" : "non_organic";
// Debug.Log($"ios ab param : {i} attribution=== {SuperApplication.Instance.attribution}");
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
//
// });
//
// void GameConfig(bool result, string config)
// {
// Debug.Log($"************* game config result : {result}, config : {config}");
// }
// // SDK初始化方法
// RgfCDfHLhn9WSDK_Utility.Instance.Init(null, null, GameConfig);
#endif
}
public static bool CheckInterstitialReady()
{
return RgfCDfHLhn9WSDK_Utility.Instance.IsInterReady();
}
// public static bool CheckInterstitialReady()
// {
// return RgfCDfHLhn9WSDK_Utility.Instance.IsInterReady();
// }
#region 广
public static UnityAction<bool> onInterstitialAdCompleted;
public static void ShowInterstitial(string placement = "DefaultInterstitial",
UnityAction<bool> onCompleted = null)
{
if (CheckInterstitialReady())
{
Debug.Log($"广告已经准备好,播放");
RgfCDfHLhn9WSDK_Utility.Instance.ShowInter(placement, () =>
{
DOVirtual.DelayedCall(0.1f, () =>
{
onCompleted?.Invoke(true);
});
});
}
else
{
Debug.Log($"广告未准备好,不播放");
onCompleted?.Invoke(false);
}
// if (CheckInterstitialReady())
// {
// Debug.Log($"广告已经准备好,播放");
// // RgfCDfHLhn9WSDK_Utility.Instance.ShowInter(placement, () =>
// // {
// // DOVirtual.DelayedCall(0.1f, () =>
// // {
onCompleted?.Invoke(true);
// // });
// // });
// }
// else
// {
// Debug.Log($"广告未准备好,不播放");
// onCompleted?.Invoke(false);
// }
}
static int retryAttemptInterstitial;
@@ -125,47 +124,47 @@ namespace ChillConnect
public static UnityAction<bool> onVideoAdCompleted;
private static string _placement = "";
public static bool CheckRewardedReady()
{
return RgfCDfHLhn9WSDK_Utility.Instance.IsVideoReady();
}
// public static bool CheckRewardedReady()
// {
// return RgfCDfHLhn9WSDK_Utility.Instance.IsVideoReady();
// }
public static void ShowVideo(string placement = "DefaultVideo", UnityAction<bool> onCompleted = null)
{
onVideoAdCompleted = onCompleted;
_placement = placement;
#if UNITY_EDITOR
onVideoAdCompleted?.Invoke(true);
#else
// #if UNITY_EDITOR
onVideoAdCompleted?.Invoke(true);
// #else
TrackKit.SendEvent(Property.adEvent,Property.watch_ad_people);
TrackKit.SendEvent(Property.adEvent,Property.Rewarded_videos_trigger_number);
if (CheckRewardedReady())
{
RgfCDfHLhn9WSDK_Utility.Instance.ShowRewardVideo(_placement, b =>
{
DOVirtual.DelayedCall(0.1f, () =>
{
onVideoAdCompleted?.Invoke(b);
});
}, ()=>
{
DOVirtual.DelayedCall(0.25f, () =>
{
Debug.Log($"激励广告关闭");
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
{
TrackKit.SendEvent(Property.adEvent, Property.AfterRewardAdShow);
GameHelper.ShowInterstitial("AfterReward");
}
});
});
}
else
{
onVideoAdCompleted?.Invoke(false);
}
#endif
// if (CheckRewardedReady())
// {
// RgfCDfHLhn9WSDK_Utility.Instance.ShowRewardVideo(_placement, b =>
// {
// DOVirtual.DelayedCall(0.1f, () =>
// {
// onVideoAdCompleted?.Invoke(b);
// });
// }, ()=>
// {
// DOVirtual.DelayedCall(0.25f, () =>
// {
// Debug.Log($"激励广告关闭");
// if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
// {
// TrackKit.SendEvent(Property.adEvent, Property.AfterRewardAdShow);
//
// GameHelper.ShowInterstitial("AfterReward");
// }
// });
// });
// }
// else
// {
// onVideoAdCompleted?.Invoke(false);
// }
// #endif
}
#endregion