This commit is contained in:
2026-07-09 18:13:07 +08:00
5 changed files with 1045 additions and 1171 deletions
+300 -320
View File
File diff suppressed because it is too large Load Diff
-25
View File
@@ -6,41 +6,16 @@ using UnityEditor;
public class BrigdeIOS public class BrigdeIOS
{ {
[DllImport("__Internal")] [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); 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);
// [DllImport("__Internal")]
// public static extern void SetTouchWebview(bool flag, bool force = false);
// [DllImport("__Internal")]
// public static extern void ScrollWebview(float dx, float dy);
[DllImport("__Internal")]
public static extern void SetPadding(float left, float top, float right, float bottom);
[DllImport("__Internal")] [DllImport("__Internal")]
public static extern void SetDarkThough(bool though); public static extern void SetDarkThough(bool though);
[DllImport("__Internal")]
public static extern void SetBtn(int left, int top, int right, int bottom);
[DllImport("__Internal")] [DllImport("__Internal")]
public static extern void ShowH5View(bool flag); public static extern void ShowH5View(bool flag);
[DllImport("__Internal")]
public static extern void SetIconProgress(float val);
[DllImport("__Internal")]
public static extern void ShowFlyBtn(bool flag);
[DllImport("__Internal")]
public static extern void setFlyBtnTag(bool flag);
[DllImport("__Internal")]
public static extern void setRewardBtnTag(bool flag);
[DllImport("__Internal")]
public static extern void copyText(string text);
[DllImport("__Internal")] [DllImport("__Internal")]
public static extern void OpenWv(); public static extern void OpenWv();
} }
-84
View File
@@ -53,26 +53,12 @@ namespace DontConfuse
// Debug.Log("[WebviewManager] SetPadding"); // Debug.Log("[WebviewManager] SetPadding");
#if UNITY_IOS && !UNITY_EDITOR #if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.OpenWv(); BrigdeIOS.OpenWv();
#endif
}
public void SetPadding(float left, float top, float right, float bottom)
{
// Debug.Log("[WebviewManager] SetPadding");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetPadding(left, top, right, bottom);
#endif #endif
} }
public void SetDarkThough(bool though) public void SetDarkThough(bool though)
{ {
#if UNITY_IOS && !UNITY_EDITOR #if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetDarkThough(though); BrigdeIOS.SetDarkThough(though);
#endif
}
public void SetBtn(int left, int top, int right, int bottom)
{
// Debug.Log("[WebviewManager] SetBtn");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetBtn(left, top, right, bottom);
#endif #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) 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)
@@ -88,51 +74,10 @@ namespace DontConfuse
BrigdeIOS.ShowH5View(flag); BrigdeIOS.ShowH5View(flag);
#endif #endif
} }
public void SetIconProgress(float val)
{
// Debug.Log("[WebviewManager] SetCTEnable");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.SetIconProgress(val);
#endif
}
public void ShowFlyBtn(bool flag)
{
// Debug.Log("[WebviewManager] SetCTEnable");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.ShowFlyBtn(flag);
#endif
}
public void setFlyBtnTag(bool flag)
{
// Debug.Log($"[WebviewManager] setFlyBtnTag ---{flag}");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.setFlyBtnTag(flag);
#endif
}
public void setRewardBtnTag(bool flag)
{
// Debug.Log($"[WebviewManager] setRewardBtnTag--- {flag}");
#if UNITY_IOS && !UNITY_EDITOR
BrigdeIOS.setRewardBtnTag(flag);
#endif
}
public void ObjC_TouchClick(string name)
{
// Debug.Log("Touch click: " + name);
// GameDispatcher.Instance.Dispatch(BingoInfo.H5ViewClickBtn, name);
}
public void H5AutoRefresh(string string_xcode) public void H5AutoRefresh(string string_xcode)
{ {
Debug.Log("string_xcode" + string_xcode);
if (string_xcode.Contains("|h5")) if (string_xcode.Contains("|h5"))
{ {
Debug.Log(JsonConvert.SerializeObject(light_restoredList));
string[] _string_arr = string_xcode.Split("|"); string[] _string_arr = string_xcode.Split("|");
if (_string_arr.Length >= 2) if (_string_arr.Length >= 2)
{ {
@@ -145,7 +90,6 @@ namespace DontConfuse
PlayerPrefs.SetString("Dailyrefreshnum", str); PlayerPrefs.SetString("Dailyrefreshnum", str);
break; break;
} }
} }
H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h5" }; H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h5" };
NetworkKit_sdk.PostWithHeader<object>("event/h5Impressions", info, (isSuccess, obj) => NetworkKit_sdk.PostWithHeader<object>("event/h5Impressions", info, (isSuccess, obj) =>
@@ -156,7 +100,6 @@ namespace DontConfuse
} }
}); });
} }
} }
else if (string_xcode.Contains("|h6")) else if (string_xcode.Contains("|h6"))
@@ -175,9 +118,7 @@ namespace DontConfuse
PlayerPrefs.SetString("Darkrefreshnum", string.Join(";", dark_restoredList.Select(row => string.Join(",", row)))); PlayerPrefs.SetString("Darkrefreshnum", string.Join(";", dark_restoredList.Select(row => string.Join(",", row))));
break; break;
} }
} }
} }
H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h6" }; H5sendClass info = new H5sendClass() { link = _string_arr[0], type = "h6" };
@@ -190,34 +131,9 @@ namespace DontConfuse
} }
}); });
} }
} }
} }
public void TouchClickPoint(string name)
{
// Debug.Log("TouchClickPoint" + name);
// if (name == null) return;
// if (name == "flyBtn")
// {
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.fly_ct_number, 1);
// //NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.fly_ct_people,1);
// }
// if (name == "rewardBtn")
// {
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_ct_number, 1);
// //NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.annular_ct_people,1);
// }
// if (name == "finish")
// {
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_finish_number, 1);
// }
}
List<int> light_restoredList; List<int> light_restoredList;
List<List<int>> dark_restoredList; List<List<int>> dark_restoredList;
public void RefreshUrl() public void RefreshUrl()
+4 -1
View File
@@ -4,5 +4,8 @@
EditorBuildSettings: EditorBuildSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Scenes: [] m_Scenes:
- enabled: 1
path: Assets/Scenes/SampleScene.unity
guid: 9fc0d4010bbf28b4594072e72b8655ab
m_configObjects: {} m_configObjects: {}