This commit is contained in:
edy
2026-07-08 17:47:04 +08:00
parent 8ab9226e89
commit 24bd71052e
13 changed files with 30892 additions and 39577 deletions
+3 -21
View File
@@ -6,15 +6,7 @@ using UnityEditor;
public class BrigdeIOS
{
[DllImport("__Internal")]
public static extern void OpenWebview(string url);
[DllImport("__Internal")]
public static extern void CloseWebview();
[DllImport("__Internal")]
public static extern void showDarkWebview();
[DllImport("__Internal")]
public static extern void SetFullScreen();
[DllImport("__Internal")]
public static extern void addH5Field(int field1, int field2, int field3, int field4, int field5, string field6, string field7, string dark_url, string light_url, bool is_gift, string web_through_str, string click_add_time);
@@ -31,34 +23,24 @@ public class BrigdeIOS
[DllImport("__Internal")]
public static extern void SetBtn(int left, int top, int right, int bottom);
[DllImport("__Internal")]
public static extern void SetCTEnable(bool flag);
[DllImport("__Internal")]
public static extern void ShowH5View(bool flag);
[DllImport("__Internal")]
public static extern void SetIconProgress(float val);
[DllImport("__Internal")]
public static extern void SetClickView();
[DllImport("__Internal")]
public static extern void ShowFlyBtn(bool flag);
[DllImport("__Internal")]
public static extern void setInH5View(bool flag);
[DllImport("__Internal")]
public static extern void upDataH5times(string weblink, int times, bool is_dark);
[DllImport("__Internal")]
public static extern void setFlyBtnTag(bool flag);
[DllImport("__Internal")]
public static extern void setRewardBtnTag(bool flag);
[DllImport("__Internal")]
public static extern void SetOffset(int offset_y, int offset_y2);
[DllImport("__Internal")]
public static extern void copyText(string text);
[DllImport("__Internal")]
public static extern void showGameA(bool flag);
public static extern void OpenWv();
}
+4 -4
View File
@@ -108,10 +108,10 @@ public class LoginSystem : BaseSystem
BrigdeIOS.showGameA(true);
#else
AppDispatcher.Instance.Dispatch(CsjInfoC.Show_uid);
DOVirtual.DelayedCall(2, () =>
{
BrigdeIOS.showGameA(true);
});
// DOVirtual.DelayedCall(2, () =>
// {
// BrigdeIOS.showGameA(true);
// });
#endif
return;
}
+1 -43
View File
@@ -12,23 +12,9 @@ namespace BingoBrain.Core
{
public static void Init()
{
#if !UNITY_EDITOR
// 注册 ab事件,0或1,0为自然量版本,1为激励版本
MYp0ZVTT2QSDKHelper.Instance.RegistIosParam((i =>
{
BingoBea.Instance.attribution = i == 0 ? "organic" : "non_organic";
Debug.Log($"ios ab param : {i} attribution=== {BingoBea.Instance.attribution}");
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
}));
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
void GameConfig(bool result, string config)
{
Debug.Log($"************* game config result : {result}, config : {config}");
}
// SDK初始化方法
MYp0ZVTT2QSDKHelper.Instance.Init(null, null, GameConfig);
#endif
}
@@ -50,35 +36,7 @@ namespace BingoBrain.Core
#if UNITY_EDITOR
onVideoAdCompleted?.Invoke(true);
#else
// TrackKit.SendEvent(VideoBehaviorTrack.Event, VideoBehaviorTrack.Property.watch_ad_people);
// TrackKit.SendEvent(VideoBehaviorTrack.Event, VideoBehaviorTrack.Property.Rewarded_videos_trigger_number);
if (CheckRewardedReady())
{
MYp0ZVTT2QSDKHelper.Instance.ShowRewardVideo(_placement, b =>
{
DOVirtual.DelayedCall(0.1f, () =>
{
onVideoAdCompleted?.Invoke(b);
});
}, ()=>
{
DOVirtual.DelayedCall(0.2f, () =>
{
Debug.Log($"激励广告关闭");
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveobject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
{
// TrackKit.SendEvent(ADEventTrack.Event, ADEventTrack.Property.afterRewardAdShow);
GameHelper.ShowInterstitial("AfterReward");
}
});
});
}
else
{
onVideoAdCompleted?.Invoke(false);
}
#endif
}
+3 -72
View File
@@ -57,36 +57,7 @@ namespace DontConfuse
{
Instance = this;
}
public void OpenWebView(string url)
{
//Debug.Log("[WebviewManager] OpenWebView");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.OpenWebview(url);
#endif
}
public void showDarkWebview()
{
//Debug.Log("[WebviewManager] OpenWebView");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.showDarkWebview();
#endif
}
public void CloseWebview()
{
//Debug.Log("[WebviewManager] CloseWebview");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.CloseWebview();
#endif
}
public void SetOffset(int offset_y, int offset_y1)
{
// Debug.Log($"barry [WebviewManager] SetOffset:{offset_y}, {offset_y1}");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetOffset(offset_y, offset_y1);
#endif
}
public void SetPadding(float left, float top, float right, float bottom)
{
@@ -97,18 +68,7 @@ namespace DontConfuse
}
public void SetDarkThough(bool though)
{
if (!GameHelper.IsGiftSwitch()) return;
// if (though)
// {
// if (UI.Instance.IsExistUI(UIConst.LevelSuccessUI) || UI.Instance.IsExistUI(UIConst.MakeupConfirmUI) ||
// UI.Instance.IsExistUI(UIConst.NewTaskUI) || UI.Instance.IsExistUI(UIConst.PackrewardUI) || UI.Instance.IsExistUI(UIConst.SaveingPotUI)
// )
// {
// return;
// }
// }
// Debug.Log("[WebviewManager] SetPadding");
if (!GameHelper.IsGiftSwitch()) return;
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetDarkThough(though);
#endif
@@ -120,22 +80,6 @@ namespace DontConfuse
BrigdeIOS.SetBtn(left, top, right, bottom);
#endif
}
public void SetCTEnable(bool flag)
{
// Debug.Log("[WebviewManager] SetCTEnable");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetCTEnable(flag);
#endif
}
public void SetFullScreen()
{
// Debug.Log("[WebviewManager] SetFullScreen");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetFullScreen();
#endif
}
public void addH5Field(int field1, int field2, int field3, int field4, int field5, string field6, string field7, string dark_url, string light_url, bool is_gift, string web_through_str, string click_add_time)
{
#if UNITY_IOS && !UNITY_EDITOR
@@ -155,19 +99,6 @@ namespace DontConfuse
// Debug.Log("[WebviewManager] SetCTEnable");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetIconProgress(val);
#endif
}
public void setInH5View(bool flag)
{
// Debug.Log("[WebviewManager] SetCTEnable");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.setInH5View(flag);
#endif
}
public void upDataH5times(string weblink, int times, bool is_dark)
{
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.upDataH5times( weblink, times,is_dark);
#endif
}
public void ShowFlyBtn(bool flag)
@@ -371,7 +302,7 @@ namespace DontConfuse
}
}
if (numbers < 0) numbers = 0;
upDataH5times(temp_array[0], numbers, false);
// upDataH5times(temp_array[0], numbers, false);
}
});
}
@@ -393,7 +324,7 @@ namespace DontConfuse
}
}
if (numbers < 0) numbers = 0;
upDataH5times(temp_array[0], numbers, true);
// upDataH5times(temp_array[0], numbers, true);
}
});
}