fix:1、同步ios修复的bug
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
public class BrigdeIOS
|
||||
{
|
||||
|
||||
[DllImport("__Internal")]
|
||||
public static extern void copyText(string text);
|
||||
// [DllImport("__Internal")]
|
||||
// public static extern void SaveVideoWithCustomDate(string videoPath);
|
||||
// [DllImport("__Internal")]
|
||||
// public static extern void SaveImageWithCustomDate(string imagePath);
|
||||
[DllImport("__Internal")]
|
||||
public static extern void TrackProduct(string eventName, string dictionaryJson);
|
||||
|
||||
|
||||
|
||||
[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);
|
||||
// [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")]
|
||||
public static extern void SetDarkThough(bool though);
|
||||
[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);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 24a1626c4e4c020408af7acbcdff0798
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -1,10 +1,11 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using ChillConnect;
|
||||
using SGModule.Common;
|
||||
using SGModule.MarkdownKit;
|
||||
using SGModule.Net;
|
||||
using SGModule.NetKit;
|
||||
using UnityEngine;
|
||||
using UNSDK;
|
||||
|
||||
|
||||
public class ChillConnectRoot : MonoBehaviour
|
||||
@@ -15,17 +16,21 @@ public class ChillConnectRoot : MonoBehaviour
|
||||
GameObject ingameDebugConsole = GameObject.Find("IngameDebugConsole");
|
||||
if (ingameDebugConsole != null) ingameDebugConsole.SetActive(false);
|
||||
#endif
|
||||
// GameObject.Find("IngameDebugConsole").SetActive(false);//zhushi
|
||||
// if (ingameDebugConsole != null) ingameDebugConsole.SetActive(false);
|
||||
|
||||
// NetworkKit.Instance.InitData(ConfigManager.GameConfig.packageName, ConfigManager.GameConfig.isRelease);
|
||||
|
||||
SdkConfigMgr.Init();
|
||||
|
||||
MaxADKit.Init();
|
||||
|
||||
OnLauncher();
|
||||
|
||||
TrackKit.TrackLoginFunnel(LoginFunnelEventType.Bootstrap);
|
||||
|
||||
#if !GAME_RELEASE
|
||||
BuildGMTool();
|
||||
NetGmTool.Instance.Init();
|
||||
#endif
|
||||
}
|
||||
|
||||
public static void OnLauncher()
|
||||
@@ -38,4 +43,98 @@ public class ChillConnectRoot : MonoBehaviour
|
||||
MarkdownKit.Instance.LoadText("privacy", "https://www.ballcrushbest.fun/privacy.md");
|
||||
MarkdownKit.Instance.LoadText("user", "https://www.ballcrushbest.fun/user.md");
|
||||
}
|
||||
|
||||
private static string adInfoLabel = "";
|
||||
private static void BuildGMTool()
|
||||
{
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Separator, () => "测试工具"));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Separator, () => "测试工具"));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "清空签到记录",
|
||||
s =>
|
||||
{
|
||||
DataMgr.SignState.Value = new List<long>();
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "测试签到",
|
||||
s =>
|
||||
{
|
||||
DataMgr.SignState.Value.Add(GameHelper.GetNowTime() + (long)TimeSpan.FromDays(DataMgr.SignState.Value.Count).TotalSeconds);
|
||||
DataMgr.SignState.Save();
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "打开礼包界面",
|
||||
s =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PackrewardUI_Open, true);
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "类型测试+10",
|
||||
s =>
|
||||
{
|
||||
DataMgr.Ticket.Value += 10;
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "客户端日志上传",
|
||||
s =>
|
||||
{
|
||||
// ErrorLogKit.Send("error", "客户端日志上传", "GM工具点击测试",SuperApplication.Instance.attribution);
|
||||
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button,
|
||||
() => "广告ID信息打印",
|
||||
s =>
|
||||
{
|
||||
// adInfoLabel += $"Max token: {MaxADKit.SDKKey} \n 激励广告Id: {MaxADKit.rewardedADUnitID} \n 插屏广告Id: {MaxADKit.interstitialADUnitID} \n";
|
||||
|
||||
}));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Button, () => "关卡+1",
|
||||
s =>
|
||||
{
|
||||
DataMgr.GameLevel.Value = DataMgr.GameLevel.Value + 1;
|
||||
}));
|
||||
// 输入设置等级
|
||||
GMTool.Instance.AddItem(new GMToolItem(
|
||||
GUIType.InputField,
|
||||
() => "设置等级",
|
||||
s =>
|
||||
{
|
||||
if (int.TryParse(s, out int level))
|
||||
{
|
||||
DataMgr.GameLevel.Value = level;
|
||||
adInfoLabel += $"手动设置等级 = {level}\n";
|
||||
|
||||
// 如果需要额外刷新,例如保存一下等级(可选)
|
||||
DataMgr.GameLevel.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
adInfoLabel += $"等级输入错误:{s}\n";
|
||||
}
|
||||
}
|
||||
));
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => $"{DataMgr.Ticket} 类型测试"));
|
||||
// 来显示 adInfoLabel 的内容
|
||||
GMTool.Instance.AddItem(new GMToolItem(GUIType.Label, () => adInfoLabel));
|
||||
GMTool.Instance.AddItem(new GMToolItem(
|
||||
GUIType.InputField,
|
||||
() => "设置等级",
|
||||
s =>
|
||||
{
|
||||
if (int.TryParse(s, out int level))
|
||||
{
|
||||
DataMgr.GameLevel.Value = level;
|
||||
adInfoLabel += $"手动设置等级 = {level}\n";
|
||||
|
||||
// 如果需要额外刷新,例如保存一下等级(可选)
|
||||
DataMgr.GameLevel.Save();
|
||||
}
|
||||
else
|
||||
{
|
||||
adInfoLabel += $"等级输入错误:{s}\n";
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
// using Gree.UnityWebView;
|
||||
// using UnityEngine;
|
||||
//
|
||||
// public class FreeWebViewManager : MonoBehaviour
|
||||
// {
|
||||
// public static FreeWebViewManager Instance;
|
||||
// private GameObject _webObj;
|
||||
// private WebViewObject1 _webView;
|
||||
//
|
||||
// private void Awake()
|
||||
// {
|
||||
// if (Instance != null) Destroy(gameObject);
|
||||
// else
|
||||
// {
|
||||
// Instance = this;
|
||||
// DontDestroyOnLoad(gameObject);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void Start()
|
||||
// {
|
||||
// initView();
|
||||
// }
|
||||
//
|
||||
// public void initView()
|
||||
// {
|
||||
// if (_webObj != null) return;
|
||||
//
|
||||
// // 创建WebView对象
|
||||
// _webObj = new GameObject("WebViewObject1");
|
||||
// _webView = _webObj.AddComponent<WebViewObject1>();
|
||||
//
|
||||
// // 关键:开启WKWebView,规避苹果审核拒绝
|
||||
// _webView.Init(
|
||||
// enableWKWebView: true,
|
||||
// cb: OnWebMessage // JS调用Unity回调
|
||||
// );
|
||||
//
|
||||
// float top_offset = 0;//fgui中的顶部信息的高度
|
||||
// float buttom_offset = 155;
|
||||
// if (Screen.safeArea.y != 0)
|
||||
// {//刘海屏
|
||||
// top_offset += Screen.safeArea.y;
|
||||
// }
|
||||
//
|
||||
// // 铺满屏幕,适配刘海安全区
|
||||
// _webView.SetMargins(0, (int)top_offset, 0, (int)buttom_offset);
|
||||
// // 禁止下拉回弹(可选)
|
||||
// _webView.SetScrollBounceEnabled(false);
|
||||
//
|
||||
// _webView.LoadURL("about:blank");
|
||||
// _webView.SetVisibility(false);
|
||||
//
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 打开网页
|
||||
// /// </summary>
|
||||
// public void OpenWeb(string url)
|
||||
// {
|
||||
// // if (_webObj != null) return;
|
||||
// //
|
||||
// // // 创建WebView对象
|
||||
// // _webObj = new GameObject("WebViewObject1");
|
||||
// // _webView = _webObj.AddComponent<WebViewObject1>();
|
||||
// //
|
||||
// // // 关键:开启WKWebView,规避苹果审核拒绝
|
||||
// // _webView.Init(
|
||||
// // enableWKWebView: true,
|
||||
// // cb: OnWebMessage // JS调用Unity回调
|
||||
// // );
|
||||
// //
|
||||
// // float top_offset = 0;//fgui中的顶部信息的高度
|
||||
// // float buttom_offset = 155;
|
||||
// // if (Screen.safeArea.y != 0)
|
||||
// // {//刘海屏
|
||||
// // top_offset += Screen.safeArea.y;
|
||||
// // }
|
||||
// //
|
||||
// // // 铺满屏幕,适配刘海安全区
|
||||
// // _webView.SetMargins(0, (int)top_offset, 0, (int)buttom_offset);
|
||||
// // // 禁止下拉回弹(可选)
|
||||
// // _webView.SetScrollBounceEnabled(false);
|
||||
// //
|
||||
// // 加载网页并显示
|
||||
// _webView.LoadURL(url);
|
||||
// _webView.SetVisibility(true);
|
||||
// }
|
||||
//
|
||||
// // JS向Unity发消息:window.unity.call("func","参数")
|
||||
// void OnWebMessage(string msg)
|
||||
// {
|
||||
// Debug.Log("收到网页消息:" + msg);
|
||||
// }
|
||||
//
|
||||
// // C#调用网页JS
|
||||
// public void CallJs(string jsCode)
|
||||
// {
|
||||
// if (_webView != null)
|
||||
// _webView.EvaluateJS(jsCode);
|
||||
// }
|
||||
//
|
||||
// /// <summary>
|
||||
// /// 关闭网页(必调用,释放原生资源)
|
||||
// /// </summary>
|
||||
// public void CloseWeb()
|
||||
// {
|
||||
// if (_webObj != null)
|
||||
// {
|
||||
// _webView.SetVisibility(false);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// private void OnDestroy()
|
||||
// {
|
||||
// if (_webObj != null)
|
||||
// {
|
||||
// _webView.SetVisibility(false);
|
||||
// Destroy(_webObj);
|
||||
// _webObj = null;
|
||||
// _webView = null;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
@@ -0,0 +1,3 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 7478ade71b9349e1a05265bf175b11c9
|
||||
timeCreated: 1782695108
|
||||
@@ -1,6 +1,7 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using ChillConnect;
|
||||
using IgnoreOPS;
|
||||
|
||||
public class LevelManager : MonoBehaviour
|
||||
{
|
||||
@@ -48,13 +49,13 @@ public class LevelManager : MonoBehaviour
|
||||
Debug.LogError("关卡ID必须大于0");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (levelId > 500)
|
||||
var gameConfigs = ConfigSystem.GetConfig<ArrowGameConfigModel>().DataList;
|
||||
if (levelId >= gameConfigs.Count)
|
||||
{
|
||||
levelId = 500;
|
||||
levelId = gameConfigs.Count - 1;
|
||||
}
|
||||
|
||||
TextAsset jsonFile = Resources.Load<TextAsset>($"{LevelResourcePath}{levelId}");
|
||||
var jsonFile = gameConfigs[levelId];
|
||||
|
||||
if (jsonFile == null)
|
||||
{
|
||||
@@ -62,7 +63,17 @@ public class LevelManager : MonoBehaviour
|
||||
return false;
|
||||
}
|
||||
|
||||
CurrentLevel = JsonUtility.FromJson<LevelConfig>(jsonFile.text);
|
||||
var curlevelConfig = new LevelConfig()
|
||||
{
|
||||
levelId = jsonFile.id,
|
||||
levelName = jsonFile.levelName,
|
||||
gridRows = jsonFile.gridRows,
|
||||
gridCols = jsonFile.gridCols,
|
||||
pointSpacing = jsonFile.pointSpacing,
|
||||
arrows = SerializeUtil.ToObject<List<ArrowConfig>>(jsonFile.arrows)
|
||||
};
|
||||
|
||||
CurrentLevel = curlevelConfig;
|
||||
|
||||
if (CurrentLevel == null || CurrentLevel.arrows == null)
|
||||
{
|
||||
|
||||
+29
-29
@@ -77,9 +77,9 @@ namespace ChillConnect
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.AppManagerRegister);
|
||||
AppDispatcher.Instance.Dispatch(AppMsg.InitUIMgr);
|
||||
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
// #if UNITY_EDITOR
|
||||
#if UNITY_EDITOR
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
// #endif
|
||||
#endif
|
||||
AppDispatcher.Instance.AddListener(AppMsg.LoginInit, OnLoadingComplete);
|
||||
|
||||
// DataMgr.InitPreferences();
|
||||
@@ -99,33 +99,33 @@ namespace ChillConnect
|
||||
SaveingPotHelper.CheckSaveingPot();
|
||||
SaveingPotHelper.TestingClearTime();
|
||||
|
||||
// if (GameHelper.IsGiftSwitch())
|
||||
// {
|
||||
// WebviewManager.Instance.SetFullScreen();
|
||||
// int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
// int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
//
|
||||
// int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
// int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
// Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
|
||||
// float top_offset = 0;//fgui中的顶部信息的高度
|
||||
// float buttom_offset = 155;
|
||||
// if (Screen.safeArea.y != 0)
|
||||
// {//刘海屏
|
||||
// top_offset += Screen.safeArea.y;
|
||||
// }
|
||||
// WebviewManager.Instance.SetOffset(offset_y, offset_y1);
|
||||
// WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
//
|
||||
// WebviewManager.Instance.RefreshUrl();
|
||||
// // Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
|
||||
// // Debug.Log($"propswitch==1 ------ {propswitch == 1}");
|
||||
// WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
// WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
// WebviewManager.Instance.SetDarkThough(true);
|
||||
// WebviewManager.Instance.ShowH5View(false);
|
||||
// WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
// }
|
||||
if (GameHelper.IsGiftSwitch())
|
||||
{
|
||||
WebviewManager.Instance.SetFullScreen();
|
||||
int flyswitch = ConfigSystem.GetConfig<CommonModel>().flyswitch;
|
||||
int propswitch = ConfigSystem.GetConfig<CommonModel>().propswitch;
|
||||
|
||||
int offset_y = ConfigSystem.GetConfig<CommonModel>().WVOffset[0];
|
||||
int offset_y1 = ConfigSystem.GetConfig<CommonModel>().WVOffset[1];
|
||||
Debug.Log("barry offset_y: " + offset_y + " offset_y1: " + offset_y1);
|
||||
float top_offset = 0;//fgui中的顶部信息的高度
|
||||
float buttom_offset = 165;
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
top_offset += Screen.safeArea.y;
|
||||
}
|
||||
WebviewManager.Instance.SetOffset(offset_y, offset_y1);
|
||||
WebviewManager.Instance.SetPadding(0, top_offset / GRoot.inst.height, 0, buttom_offset / GRoot.inst.height);
|
||||
|
||||
WebviewManager.Instance.RefreshUrl();
|
||||
// Debug.Log($"flyswitch==1 ------ {flyswitch == 1}");
|
||||
// Debug.Log($"propswitch==1 ------ {propswitch == 1}");
|
||||
WebviewManager.Instance.setFlyBtnTag(flyswitch == 1);
|
||||
WebviewManager.Instance.setRewardBtnTag(propswitch == 1);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
WebviewManager.Instance.SetBtn(ConfigSystem.GetConfig<CommonModel>().propCoord[0], ConfigSystem.GetConfig<CommonModel>().propCoord[1], 60, 60);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@@ -133,7 +133,7 @@ public class MaxPayManager
|
||||
paydata.status = 1;
|
||||
SavePayData(response.Data.order_id, paydata);
|
||||
isPay = true;
|
||||
Application.OpenURL(response.Data.pay_url);
|
||||
OpenBrowser.OpenURL(response.Data.pay_url);
|
||||
|
||||
}
|
||||
});
|
||||
@@ -377,6 +377,7 @@ public class MaxPayManager
|
||||
SaveingPotClass taskData = SaveData.GetSaveObject().saveingpot_history.Last();
|
||||
Makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(taskData.tableId);
|
||||
SaveData.GetSaveObject().saveingpot_ch += ((float)paydata.amount) / 100 * makeupVo.PayIncrease; ;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.refreshGift);
|
||||
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
if ((SaveData.GetSaveObject().saveingpot_ch > taskData.amount) && (!taskData.auto_show) && !UIManager.Instance.IsExistUI(UIConst.H5UI))
|
||||
|
||||
@@ -9,6 +9,7 @@ using FGUI.Arrow_game;
|
||||
using FGUI.Common_01;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
using btn_saveingpot = FGUI.Common_01.btn_saveingpot;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -98,7 +99,7 @@ namespace ChillConnect
|
||||
private Vector2 _lastTouchPos;
|
||||
private bool _isDraging;
|
||||
// 拖拽边界留边(防止完全移出屏幕)
|
||||
private readonly float _dragBorder = 100f;
|
||||
private readonly float _dragBorder = -300f;
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -347,6 +348,19 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.panel.y += Screen.safeArea.y - 25;
|
||||
ui.com_money.y += Screen.safeArea.y- 15;
|
||||
ui.com_gem.y += Screen.safeArea.y - 15;
|
||||
ui.btn_signin.y += Screen.safeArea.y - 25;
|
||||
ui.com_gift.y += Screen.safeArea.y - 15;
|
||||
ui.btn_wv.y += Screen.safeArea.y - 25;
|
||||
}
|
||||
|
||||
ui.state.selectedIndex = GameHelper.IsGiftSwitch() ? 1 : 0;
|
||||
|
||||
|
||||
//加载配置
|
||||
// InitAllLevelData();
|
||||
LoadLevelConfig();
|
||||
@@ -365,6 +379,50 @@ namespace ChillConnect
|
||||
InitView();
|
||||
|
||||
((com_money)ui.com_money).btn_ch.title = GameHelper.getDesByKey("ch_out_1");
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_saveingpot.visible = true;
|
||||
ui.com_gift.visible = true;
|
||||
}
|
||||
|
||||
GameHelper.IsShowFirstReward();
|
||||
|
||||
GameHelper.IsShowPettyReward();
|
||||
|
||||
GameHelper.ShowStatementView();
|
||||
}
|
||||
|
||||
private void RefreshGift(object obj = null)
|
||||
{
|
||||
ui.com_gift.text_gift.text = GameHelper.Get102Str((decimal)SaveData.GetSaveObject().saveingpot_ch);
|
||||
}
|
||||
|
||||
private void Set101(decimal coin = -1)
|
||||
{
|
||||
if (coin < 0)
|
||||
{
|
||||
coin = DataMgr.Coin.Value;
|
||||
}
|
||||
|
||||
if (ui.com_gem is com_gold btnCoin) btnCoin.text_gold.text = $"{coin:N0}";
|
||||
}
|
||||
|
||||
private void Set102()
|
||||
{
|
||||
decimal coin = DataMgr.Ticket.Value;
|
||||
|
||||
if (ui.com_money is com_money comMoney) comMoney.text_gold.text = coin.ToString("0.00");
|
||||
}
|
||||
|
||||
public void OnUpdate101(object obj = null)
|
||||
{
|
||||
Set101();
|
||||
}
|
||||
|
||||
public void OnUpdate102(object obj = null)
|
||||
{
|
||||
Set102();
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -390,6 +448,7 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.AddListener(GameMsg.UpdateSpeed, SetSpeed);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.UseProps, SetUserPorp);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.StopArrowTouch,OpenOrStopGameInput);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.refreshGift,RefreshGift);
|
||||
|
||||
}
|
||||
|
||||
@@ -402,6 +461,8 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.UpdateSpeed, SetSpeed);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.UseProps, SetUserPorp);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.StopArrowTouch, OpenOrStopGameInput);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.refreshGift,RefreshGift);
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -487,12 +548,22 @@ namespace ChillConnect
|
||||
SetModel();
|
||||
|
||||
SetTopCurr();
|
||||
|
||||
Set101();
|
||||
|
||||
RefreshGift();
|
||||
|
||||
_fingerTipObj = com_finger.CreateInstance();
|
||||
_viewContainer.AddChild(_fingerTipObj);
|
||||
_fingerTipObj.visible = false;
|
||||
_fingerTipObj.touchable = false;
|
||||
_fingerTipObj.sortingOrder = 9999;
|
||||
|
||||
|
||||
if (GameHelper.IsShowOpenGameUI() && HallManager.Instance.openTipsTimes >= 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -542,6 +613,7 @@ namespace ChillConnect
|
||||
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
|
||||
if (vo == null)
|
||||
{
|
||||
Debug.LogError("MakeupTaskData 为空");
|
||||
return;
|
||||
}
|
||||
GameHelper.showGameUI = false;
|
||||
@@ -563,6 +635,20 @@ namespace ChillConnect
|
||||
uiCtrlDispatcher.Dispatch(UICtrlMsg.PersonViewUI_Open, _moveSpeed);
|
||||
});
|
||||
|
||||
if (!GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().WVswitch == 0)
|
||||
{
|
||||
ui.btn_wv.visible = false;
|
||||
}
|
||||
ui.btn_wv.SetClick(() =>
|
||||
{
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = true,
|
||||
url = ""
|
||||
};
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
});
|
||||
|
||||
ui.com_bottom.btn_skin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.ArrowThemeUI_Open); });
|
||||
|
||||
ui.btn_petty.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.PettyAwardUI_Open); });
|
||||
@@ -572,6 +658,8 @@ namespace ChillConnect
|
||||
ui.btn_statement.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open); });
|
||||
|
||||
ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
|
||||
|
||||
ui.com_gift.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
|
||||
}
|
||||
|
||||
|
||||
@@ -1135,6 +1223,7 @@ namespace ChillConnect
|
||||
unit.GetChild("line").asGraph.color = lineColor;
|
||||
unit.visible = true;
|
||||
unit.touchable = true;
|
||||
unit.name = "Arrow_" + arrow.id;
|
||||
unit.onClick.Add(() => OnPathClick(arrow));
|
||||
|
||||
_viewContainer.AddChild(unit);
|
||||
@@ -1183,6 +1272,7 @@ namespace ChillConnect
|
||||
else if (type == 1)
|
||||
{
|
||||
_isDeleteMode = !_isDeleteMode;
|
||||
GameHelper.ShowTips("You can delete any one of the arrows!");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1640,6 +1730,7 @@ namespace ChillConnect
|
||||
if (icon != null) icon.color = arrowColor;
|
||||
|
||||
arrowIns.visible = true;
|
||||
arrowIns.name = "Arrow_" + arrow.id;
|
||||
arrowIns.onClick.Add(() => OnPathClick(arrow));
|
||||
_viewContainer.AddChild(arrowIns);
|
||||
|
||||
@@ -1883,12 +1974,15 @@ namespace ChillConnect
|
||||
/// </summary>
|
||||
private void DisappearLineGetReward()
|
||||
{
|
||||
|
||||
if (!GameHelper.IsGiftSwitch()) return;
|
||||
|
||||
bool isGet = false;
|
||||
|
||||
int money_rate = ConfigSystem.GetConfig<CommonModel>().rewardrate;
|
||||
var randomNum = UnityEngine.Random.Range(0, 100);
|
||||
// Debug.Log($"[creat] money_rate------------ {randomNum}==={money_rate}");
|
||||
if (GameHelper.IsGiftSwitch() && randomNum < money_rate)
|
||||
if (randomNum < money_rate)
|
||||
{
|
||||
isGet = true;
|
||||
|
||||
|
||||
@@ -51,12 +51,32 @@ namespace ChillConnect
|
||||
{
|
||||
uiCtrlDispatcher.AddListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.AddListener(closeUIMsg, CloseUI);
|
||||
|
||||
GameDispatcher.Instance.AddListener(GameMsg.Update101, OnUpdate101);
|
||||
GameDispatcher.Instance.AddListener(GameMsg.Update102, OnUpdate102);
|
||||
}
|
||||
protected override void RemoveListener()
|
||||
{
|
||||
uiCtrlDispatcher.RemoveListener(openUIMsg, OpenUI);
|
||||
uiCtrlDispatcher.RemoveListener(closeUIMsg, CloseUI);
|
||||
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.Update101, OnUpdate101);
|
||||
GameDispatcher.Instance.RemoveListener(GameMsg.Update102, OnUpdate102);
|
||||
|
||||
}
|
||||
|
||||
private void OnUpdate101(object obj)
|
||||
{
|
||||
ui?.OnUpdate101(obj);
|
||||
}
|
||||
|
||||
|
||||
private void OnUpdate102(object obj)
|
||||
{
|
||||
ui?.OnUpdate102(obj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using FGUI.Arrow_game;
|
||||
using IgnoreOPS;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -21,7 +22,7 @@ namespace ChillConnect
|
||||
{
|
||||
uiInfo.packageName = "Arrow_game";
|
||||
uiInfo.assetName = "com_tips";
|
||||
uiInfo.layerType = UILayerType.Loading;
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
@@ -36,6 +37,9 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
CommonHelper.FadeOut(ui);
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent -= UpdateCd;
|
||||
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -43,12 +47,24 @@ namespace ChillConnect
|
||||
ui = baseUI as com_tips;
|
||||
}
|
||||
|
||||
private int state_;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
if (args != null)
|
||||
{
|
||||
InitView((int)args);
|
||||
state_ = (int)args + 5;
|
||||
}
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent += UpdateCd;
|
||||
UpdateCd();
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_watch.img_saveingpot.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -79,7 +95,7 @@ namespace ChillConnect
|
||||
if (isSuccess)
|
||||
{
|
||||
Debug.Log($"isSuccess tips state = {state} ");
|
||||
|
||||
GameHelper.SetWatchCd(state_);
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.UseProps, state);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
@@ -88,5 +104,24 @@ namespace ChillConnect
|
||||
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
}
|
||||
|
||||
|
||||
private void UpdateCd()
|
||||
{
|
||||
var btnWatch = ui.btn_watch ;
|
||||
// Debug.Log($"DataMgr.NewWatchCd.Value[state_ + 2]==={DataMgr.NewWatchCd.Value[state_ + 2]}");
|
||||
if (DataMgr.NewWatchCd.Value[state_] > Convert.ToInt32(GameHelper.GetNowTime()))
|
||||
{
|
||||
btnWatch.enabled = false;
|
||||
btnWatch.can.selectedIndex = 1;
|
||||
btnWatch.text.text = CommonHelper.TimeFormat(DataMgr.NewWatchCd.Value[state_] - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_watch.enabled = true;
|
||||
btnWatch.can.selectedIndex = 0;
|
||||
btnWatch.text.text = "Use Item";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,7 +193,7 @@ namespace ChillConnect
|
||||
name = name[..4] + "...";
|
||||
}
|
||||
// text_ui.hide_text.text = GameHelper.getDesByKey("makeup_4");
|
||||
var money_text = GameHelper.getChString(decimal.Parse(config_money_list[money_index]));
|
||||
var money_text = GameHelper.Get102Str(decimal.Parse(config_money_list[money_index]));
|
||||
string broad_text = String.Format(GameHelper.getDesByKey("makeup_4"), name, money_text, DateTimeManager.Instance.GetCurrDateTime());
|
||||
text_ui.cast_text.text = broad_text;
|
||||
ui.t0.Play();
|
||||
|
||||
@@ -161,6 +161,7 @@ namespace ChillConnect
|
||||
{
|
||||
DataMgr.ArrowResultLevel.Value = 0;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
else if (DataMgr.ArrowResultLevel.Value == 0)
|
||||
{
|
||||
@@ -169,10 +170,10 @@ namespace ChillConnect
|
||||
if (success)
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.reset_game, true);
|
||||
CtrlCloseUI();
|
||||
}
|
||||
});
|
||||
}
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
ui.com_arrow_end.btn_restart.SetClick(() =>
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
|
||||
|
||||
using DG.Tweening;
|
||||
using FGUI.ZM_H5_15;
|
||||
using IgnoreOPS;
|
||||
using SGModule.NetKit;
|
||||
using UNSDK;
|
||||
using UnityEngine;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -44,8 +45,15 @@ namespace ChillConnect
|
||||
|
||||
HallManager.Instance.SetCameraVisible(true);
|
||||
|
||||
SdkConfigMgr.Instance.Close();
|
||||
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(false);
|
||||
WebviewManager.Instance.ShowH5View(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
// FreeWebViewManager.Instance.CloseWeb();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -54,16 +62,31 @@ namespace ChillConnect
|
||||
ui = baseUI as FGUI.ZM_H5_15.com_webview;
|
||||
}
|
||||
|
||||
private SDKOpenConfig _config;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args is not SDKOpenConfig openConfig) return;
|
||||
|
||||
_config = openConfig;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
// delayedCall = DOVirtual.DelayedCall(0.3f, () =>
|
||||
// {
|
||||
// Debug.Log($"H5UI OpenBefore url: {_config.url} normal: {_config.normal}");
|
||||
if (_config.normal)
|
||||
{
|
||||
WebviewManager.Instance.setInH5View(true);
|
||||
WebviewManager.Instance.ShowH5View(true);
|
||||
}
|
||||
else
|
||||
{
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
// FreeWebViewManager.Instance.OpenWeb(_config.url);
|
||||
});
|
||||
}
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.hideBroadCast);
|
||||
|
||||
|
||||
|
||||
ui.btn_close.SetClick(() =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.H5UI_Close);
|
||||
|
||||
@@ -11,7 +11,6 @@ using Newtonsoft.Json;
|
||||
using SGModule.Net;
|
||||
using SGModule.NetKit;
|
||||
using UnityEngine;
|
||||
using UNSDK;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -49,6 +48,9 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnClose()
|
||||
{
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
|
||||
HallManager.Instance.UpdateSecondEvent -= Update;
|
||||
HallManager.Instance.UpdateSecondEvent -= upTaskWatchAdsBtn;
|
||||
@@ -56,6 +58,7 @@ namespace ChillConnect
|
||||
|
||||
GameHelper.showGameUI = true;
|
||||
// WebviewManager.ShezhiACT(true);
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
gameDispatcher.Dispatch(GameMsg.MakeUpConfirmUIClosed);
|
||||
|
||||
@@ -79,6 +82,9 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
if (Screen.safeArea.y != 0)
|
||||
{//刘海屏
|
||||
ui.group_.y += Screen.safeArea.y;
|
||||
@@ -89,7 +95,7 @@ namespace ChillConnect
|
||||
// DataMgr.Ticket.Value = 999999999; //zhushi
|
||||
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
makeupTaskData = args as MakeupTaskData;
|
||||
ch_index = makeupTaskData.tableId - 1;
|
||||
ui.btn_earn.title = GameHelper.getDesByKey("ch_out_1");
|
||||
@@ -627,6 +633,7 @@ namespace ChillConnect
|
||||
|
||||
ui.text_condi1.text = GameHelper.getChString(vo.item_need);
|
||||
ui.pb_condi1.max = vo.item_need;
|
||||
Debug.Log($"DataMgr.Ticket.Value==============={DataMgr.Ticket.Value}");
|
||||
ui.text_ch_number.text = GameHelper.getChString(DataMgr.Ticket.Value);
|
||||
var curValue = Math.Min(DataMgr.Ticket.Value, vo.item_need);
|
||||
ui.pb_condi1.value = (double)curValue;
|
||||
@@ -987,7 +994,7 @@ namespace ChillConnect
|
||||
{
|
||||
com_ticket_item item = (com_ticket_item)obj;
|
||||
|
||||
item.lab_num.text = GameHelper.getPrice(makeupTaskData.rdData[index].coupon_mount);
|
||||
item.lab_num.text = GameHelper.GetPriceInt(makeupTaskData.rdData[index].coupon_mount);
|
||||
|
||||
if (makeupTaskData.rdData[index].isClaimed)
|
||||
{
|
||||
@@ -1055,7 +1062,8 @@ namespace ChillConnect
|
||||
normal = false,
|
||||
url = vo.T_ShopURL
|
||||
};
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using DG.Tweening;
|
||||
using FGUI.Common_01;
|
||||
using FGUI.Game_04;
|
||||
using IgnoreOPS;
|
||||
using Spine.Unity;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -9,9 +12,8 @@ namespace ChillConnect
|
||||
{
|
||||
private OpenGameUICtrl ctrl;
|
||||
private OpenGameModel model;
|
||||
private com_open ui;
|
||||
private com_open_tips ui;
|
||||
private Action closeCallback;
|
||||
private bool need_show = true;
|
||||
|
||||
public OpenGameUI(OpenGameUICtrl ctrl) : base(ctrl)
|
||||
{
|
||||
@@ -21,12 +23,12 @@ namespace ChillConnect
|
||||
|
||||
protected override void SetUIInfo(UIInfo uiInfo)
|
||||
{
|
||||
uiInfo.packageName = "Game_04";
|
||||
uiInfo.assetName = "com_open";
|
||||
uiInfo.packageName = "Common_01";
|
||||
uiInfo.assetName = "com_open_tips";
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = false;
|
||||
uiInfo.isNeedCloseAnim = false;
|
||||
uiInfo.isNeedUIMask = false;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
}
|
||||
|
||||
#region 生命周期
|
||||
@@ -42,23 +44,43 @@ namespace ChillConnect
|
||||
|
||||
protected override void OnBind()
|
||||
{
|
||||
ui = baseUI as com_open;
|
||||
ui = baseUI as com_open_tips;
|
||||
}
|
||||
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
if (args != null) need_show = (bool)args;
|
||||
string stage = GameHelper.gameType == 0 ? "Lv." + GameHelper.GetLevel() : "";
|
||||
ui.text_level.text = stage;
|
||||
try
|
||||
{
|
||||
// 添加空值检查,防止 NullReferenceException
|
||||
var makeupTaskHistory = DataMgr.MakeupTaskHistory?.Value;
|
||||
if (makeupTaskHistory != null && makeupTaskHistory.Any())
|
||||
{
|
||||
var makeupTaskData = makeupTaskHistory.Last();
|
||||
var config = ConfigSystem.GetConfig<MakeupModel>();
|
||||
if (config != null)
|
||||
{
|
||||
var vo = config.GetData(makeupTaskData.tableId);
|
||||
if (vo != null && ui?.text_level_limit != null)
|
||||
{
|
||||
var stage= vo.levels_need - GameHelper.GetLevel();
|
||||
if(stage <= 0)
|
||||
{
|
||||
stage = 1;
|
||||
}
|
||||
ui.text_level_limit.SetVar("x", stage.ToString()).FlushVars();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine(e);
|
||||
throw;
|
||||
}
|
||||
|
||||
|
||||
InitView();
|
||||
|
||||
DOVirtual.DelayedCall(0.7f, () => { GameDispatcher.Instance.Dispatch(GameMsg.reset_game, args); });
|
||||
|
||||
if (AudioManager.Instance.IsOpenEffect)
|
||||
{
|
||||
AudioManager.Instance.PlayDynamicEffect(AudioConst.game_open);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -85,48 +107,19 @@ namespace ChillConnect
|
||||
}
|
||||
#endregion
|
||||
|
||||
//初始化页面逻辑
|
||||
//初始化页面逻辑`
|
||||
private void InitView()
|
||||
{
|
||||
|
||||
|
||||
// var sk = FXManager.Instance.SetFx<SkeletonAnimation>(ui.anim, Fx_Type.fx_open, ref closeCallback);
|
||||
// sk.state.SetAnimation(0, "animation", false);
|
||||
|
||||
|
||||
// DOVirtual.DelayedCall(2.8f, () =>
|
||||
// {
|
||||
// ui.bg.visible = false;
|
||||
// });
|
||||
ui.t0.Play();
|
||||
DOVirtual.DelayedCall(1.5f, () =>
|
||||
ui.t0.Play(() =>
|
||||
{
|
||||
// ui.anim.visible = false;
|
||||
if (need_show&&GameHelper.IsGiftSwitch()) {
|
||||
if (GameHelper.IsShowLevelTips())
|
||||
{
|
||||
// ui.tips_node.visible = false;
|
||||
DOVirtual.DelayedCall(0.2f, ()=>{
|
||||
// ui.tips_node.visible = true;
|
||||
var meteor1 = FXManager.Instance.SetFx<SkeletonAnimation>(ui.tips_node, Fx_Type.fx_tips, ref closeCallback);
|
||||
meteor1.state.SetAnimation(0, "animation", false);
|
||||
meteor1.state.Complete += a =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
};
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
}
|
||||
} else {
|
||||
DOVirtual.DelayedCall(0.4f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
});
|
||||
}
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -121,7 +121,7 @@ namespace ChillConnect
|
||||
|
||||
ui.btn_privacy.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 0); });
|
||||
ui.btn_terms.SetClick(() => { UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.PrivacyUI_Open, 1); });
|
||||
ui.btn_official.SetClick(() => { Application.OpenURL("http://captainsroll.com/"); });
|
||||
ui.btn_official.SetClick(() => { OpenBrowser.OpenURL("http://captainsroll.com/"); });
|
||||
|
||||
ui.btn_us.SetClick(() => { GameHelper.OpenEmail(); });
|
||||
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace ChillConnect
|
||||
SaveData.GetSaveObject().PettyDataLimit = day;
|
||||
}
|
||||
|
||||
if (!IsPettyDataExpired())
|
||||
if (IsPettyDataExpired())
|
||||
{
|
||||
ui.com_detail.btn_redeem.visible = true;
|
||||
ui.com_detail.btn_redeem.SetClick(() =>
|
||||
|
||||
@@ -105,7 +105,7 @@ namespace ChillConnect
|
||||
ui.text_list.EnsureBoundsCorrect();
|
||||
});
|
||||
|
||||
ui.btn_close.SetClick(CtrlCloseUI);
|
||||
ui.btn_back.SetClick(CtrlCloseUI);
|
||||
}
|
||||
|
||||
public string[] getstr(string strs, int len)
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
using FGUI.tixian;
|
||||
using IgnoreOPS;
|
||||
using UNSDK;
|
||||
|
||||
namespace ChillConnect
|
||||
{
|
||||
@@ -21,7 +20,7 @@ namespace ChillConnect
|
||||
{
|
||||
uiInfo.packageName = "tixian";
|
||||
uiInfo.assetName = "com_redeem_code";
|
||||
uiInfo.layerType = UILayerType.Loading;
|
||||
uiInfo.layerType = UILayerType.Popup;
|
||||
uiInfo.isNeedOpenAnim = true;
|
||||
uiInfo.isNeedCloseAnim = true;
|
||||
uiInfo.isNeedUIMask = true;
|
||||
@@ -73,12 +72,12 @@ namespace ChillConnect
|
||||
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = ConfigSystem.GetConfig<CommonModel>().X_ShopURL
|
||||
};
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
|
||||
CtrlCloseUI();
|
||||
});
|
||||
|
||||
@@ -59,7 +59,13 @@ namespace ChillConnect
|
||||
|
||||
InitData();
|
||||
InitView();
|
||||
// ui.btn_null.SetClick(() => { });
|
||||
// ui.btn_null.SetClick(() => { });+
|
||||
|
||||
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1)
|
||||
{
|
||||
ui.btn_multi.GetChild("img_saveingpot").visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnOpen(object args)
|
||||
@@ -103,7 +109,7 @@ namespace ChillConnect
|
||||
}
|
||||
else
|
||||
{
|
||||
ui.btn_collect.title ="(" + "Claim(<img src='ui://o9974uc5k1oncy'/>" + GameHelper.Get101Str((decimal)value) + ")";
|
||||
ui.btn_collect.title ="Claim(<img src='ui://o9974uc5npswda'/>" + GameHelper.Get101Str((decimal)value) + ")";
|
||||
}
|
||||
DOVirtual.DelayedCall(0.2f, () =>
|
||||
{
|
||||
@@ -164,7 +170,7 @@ namespace ChillConnect
|
||||
}
|
||||
cash_num = value;
|
||||
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
{
|
||||
@@ -189,7 +195,7 @@ namespace ChillConnect
|
||||
}
|
||||
void setItemUrl(GLoader loader, int urltype)
|
||||
{
|
||||
if (urltype == 0) loader.url = "ui://ZM_Common_01/cards_gold"; //jinbi
|
||||
if (urltype == 0) loader.url = "ui://ZM_Common_01/gem_small"; //jinbi
|
||||
else if (urltype == 1) loader.url = "ui://Common_01/spin_remove"; //yichu
|
||||
else if (urltype == 2) loader.url = "ui://Common_01/spin_undo"; //chehui
|
||||
else if (urltype == 3) loader.url = "ui://Common_01/spin_refresh"; //shuaxin
|
||||
@@ -298,7 +304,7 @@ namespace ChillConnect
|
||||
var src = "(";
|
||||
var rewards = GameHelper.Get102Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
|
||||
if (!GameHelper.IsGiftSwitch()){
|
||||
src = "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
src = "(<img src='ui://o9974uc5npswda'/>";
|
||||
rewards = GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
|
||||
}
|
||||
|
||||
@@ -357,7 +363,7 @@ namespace ChillConnect
|
||||
// return;
|
||||
// }
|
||||
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5cou6b8'/>";
|
||||
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
|
||||
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
|
||||
{
|
||||
rate_idnex++;
|
||||
|
||||
@@ -12,7 +12,6 @@ using SGModule.Net;
|
||||
using SGModule.NetKit;
|
||||
using Spine.Unity;
|
||||
using UnityEngine;
|
||||
using UNSDK;
|
||||
using Random = UnityEngine.Random;
|
||||
|
||||
namespace ChillConnect
|
||||
@@ -56,9 +55,11 @@ namespace ChillConnect
|
||||
AdRedeemManager.Instance.Destroy();
|
||||
HallManager.Instance.UpdateSecondEvent -= updateSpeedCD;
|
||||
HallManager.Instance.UpdateSecondEvent -= Update;
|
||||
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
|
||||
closeCallback?.Invoke();
|
||||
// WebviewManager.ShezhiACT(true);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(true);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
|
||||
|
||||
if (SaveLocalData.GetSaveLocalObject().rankRewardData.Count > 0 && !HallManager.Instance.isShowRankView)
|
||||
@@ -82,7 +83,8 @@ namespace ChillConnect
|
||||
}
|
||||
|
||||
// WebviewManager.ShezhiACT(false);
|
||||
|
||||
WebviewManager.Instance.SetDarkThough(false);
|
||||
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Close);
|
||||
|
||||
|
||||
@@ -112,6 +114,9 @@ namespace ChillConnect
|
||||
HallManager.Instance.UpdateSecondEvent += Update;
|
||||
updateSpeedCD();
|
||||
InitBroadCast();
|
||||
|
||||
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
|
||||
upLvWatchAdsBtn();
|
||||
|
||||
}
|
||||
|
||||
@@ -170,30 +175,34 @@ namespace ChillConnect
|
||||
Debug.Log("iiiiiiiiiiiiiiiiiiiii");
|
||||
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
|
||||
{
|
||||
ui.btn_ch.title = "Go";
|
||||
((btn_watchAd)ui.btn_ch).watch.text = "Go";
|
||||
ui.btn_ch.SetClick(() =>
|
||||
{
|
||||
// if (UIManager.Instance.IsExistUI(UIConst.HallUI))
|
||||
// {
|
||||
// GameDispatcher.Instance.Dispatch(GameMsg.MainTab, 1);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// buygoldParam param = new buygoldParam()
|
||||
// {
|
||||
// isShow1 = false,
|
||||
// is_in_game = true
|
||||
// };
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.BuygoldUI_Open, param);
|
||||
// }
|
||||
CtrlCloseUI();
|
||||
GameHelper.ShowVideoAd("SaveingPotAd", isSuccess =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
var ad_times = Convert.ToInt32(GameHelper.GetNowTime());
|
||||
SaveData.GetSaveObject()._watch_ad_cd = ad_times + GameHelper.GetCommonModel().exchangeCD;
|
||||
|
||||
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
|
||||
btnWatchad.enabled = false;
|
||||
btnWatchad.can_buy.selectedIndex = 1;
|
||||
btnWatchad.btn_text.text = CommonHelper.TimeFormat(SaveData.GetSaveObject()._watch_ad_cd - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
HallManager.Instance.UpdateSecondEvent += upLvWatchAdsBtn;
|
||||
InitView();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
ui.btn_ch.SetClick(() =>
|
||||
btn_watchAd btnWatchad = ui.btn_ch as btn_watchAd;
|
||||
btnWatchad.enabled = true;
|
||||
btnWatchad.buy_state.selectedIndex = 1;
|
||||
btnWatchad.title = "GET GIFT CARD";
|
||||
btnWatchad.SetClick(() =>
|
||||
{
|
||||
makeupTaskData.needShowAni = false;
|
||||
SaveData.saveDataFunc();
|
||||
@@ -304,9 +313,37 @@ namespace ChillConnect
|
||||
ui.btn_watch.enabled = true;
|
||||
ui.btn_watch.show_cd.selectedIndex = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void upLvWatchAdsBtn()
|
||||
{
|
||||
var lastAdTimes = SaveData.GetSaveObject()._watch_ad_cd;
|
||||
btn_watchAd btn_watchad = ui.btn_ch as btn_watchAd;
|
||||
btn_watchad.img_saveingpot.visible = false;
|
||||
|
||||
if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount)
|
||||
{
|
||||
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
|
||||
InitView();
|
||||
return;
|
||||
}
|
||||
|
||||
if (GameHelper.GetNowTime() < lastAdTimes)
|
||||
{
|
||||
btn_watchad.enabled = false;
|
||||
btn_watchad.can_buy.selectedIndex = 1;
|
||||
btn_watchad.btn_text.text = CommonHelper.TimeFormat(lastAdTimes - Convert.ToInt32(GameHelper.GetNowTime()), CountDownType.Hour);
|
||||
}
|
||||
else
|
||||
{
|
||||
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
|
||||
btn_watchad.enabled = true;
|
||||
btn_watchad.can_buy.selectedIndex = 0;
|
||||
if (GameHelper.IsGiftSwitch() && ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1) btn_watchad.img_saveingpot.visible = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnInline()
|
||||
{
|
||||
CheckBtnWatchStatus();
|
||||
@@ -512,7 +549,7 @@ namespace ChillConnect
|
||||
private void refreshItem(int index, GObject obj)
|
||||
{
|
||||
com_ticket_item item = (com_ticket_item)obj;
|
||||
item.lab_num.text = GameHelper.getPrice(makeupTaskData.rdData[index].coupon_mount);
|
||||
item.lab_num.text = GameHelper.GetPriceInt(makeupTaskData.rdData[index].coupon_mount);
|
||||
|
||||
if (makeupTaskData.rdData[index].isClaimed)
|
||||
{
|
||||
@@ -577,12 +614,15 @@ namespace ChillConnect
|
||||
ui.btn_contact_us.SetClick(() =>
|
||||
{
|
||||
// GameHelper.OpenEmail();
|
||||
|
||||
SDKOpenConfig openConfig = new SDKOpenConfig
|
||||
{
|
||||
normal = false,
|
||||
url = vo.C_ShopURL
|
||||
};
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
|
||||
|
||||
|
||||
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
|
||||
|
||||
CtrlCloseUI();
|
||||
});
|
||||
@@ -736,6 +776,8 @@ namespace ChillConnect
|
||||
// DataMgr.MakeupTaskHistory.Save();
|
||||
//OnInline();
|
||||
SaveData.GetSaveObject().saveingpot_ch -= vo.item_need;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.refreshGift);
|
||||
|
||||
SaveingPotHelper.CreatSaveingPotItem();
|
||||
// Debug.Log(JsonConvert.SerializeObject(vo));
|
||||
if (vo.id == 1)
|
||||
@@ -818,7 +860,7 @@ namespace ChillConnect
|
||||
return;
|
||||
}
|
||||
DataMgr.ExchangeAccount.Value= account;
|
||||
DataMgr.ExchangeName .Value= $"{fname} {lname}";
|
||||
DataMgr.ExchangeName.Value= $"{fname} {lname}";
|
||||
DataMgr.short_name = fname;
|
||||
DataMgr.long_name = lname;
|
||||
showPaypal();
|
||||
@@ -837,12 +879,12 @@ namespace ChillConnect
|
||||
}
|
||||
|
||||
|
||||
ui.com_pay.text_name.text = DataMgr.ExchangeName .Value;
|
||||
ui.com_pay.text_name.text = DataMgr.ExchangeName.Value;
|
||||
ui.com_pay.text_email.text = DataMgr.ExchangeAccount.Value;
|
||||
|
||||
ui.com_pay.btn_change.SetClick(() =>
|
||||
{
|
||||
DataMgr.ExchangeName = null;
|
||||
DataMgr.ExchangeName.Value = null;
|
||||
DataMgr.ExchangeAccount.Value = null;
|
||||
OnEnter();
|
||||
|
||||
@@ -878,7 +920,7 @@ namespace ChillConnect
|
||||
|
||||
for (int i = 0; i < btn_list.Count; i++)
|
||||
{
|
||||
btn_list[i].text_ch.text = "$" + (int)makeup_list[i].item_need;
|
||||
btn_list[i].text_ch.text = makeup_list[i].item_need + "";
|
||||
Debug.Log(makeup_list[i].item_need);
|
||||
btn_list[i].index.selectedIndex = i;
|
||||
if (i >= saveingpot_history.Count)
|
||||
|
||||
@@ -140,6 +140,7 @@ namespace ChillConnect
|
||||
btnSign.day.selectedIndex = 1;
|
||||
btnSign.reward_num1.text = GameHelper.Get101Str(reward.quantity[1]);
|
||||
setItemUrl(btnSign.loader_icon0, reward.rewards_type[1]);
|
||||
btnSign.x = 300;
|
||||
}
|
||||
btnSign.anim_sign.visible = false;
|
||||
|
||||
|
||||
@@ -41,6 +41,11 @@ namespace ChillConnect
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
|
||||
|
||||
//open_sign();
|
||||
|
||||
if (GameHelper.IsShowOpenGameUI() &&HallManager.Instance.openTipsTimes == 1)
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Open);
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnBind()
|
||||
@@ -48,8 +53,11 @@ namespace ChillConnect
|
||||
ui = baseUI as FGUI.Lobby_03.com_statement;
|
||||
}
|
||||
|
||||
private bool need_show = false;
|
||||
protected override void OnOpenBefore(object args)
|
||||
{
|
||||
HallManager.Instance.openTipsTimes++;
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
|
||||
|
||||
InitView();
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
public class OpenBrowser
|
||||
{
|
||||
[DllImport("__Internal")]
|
||||
public static extern void _openURL(string url);
|
||||
|
||||
public static void OpenURL(string url)
|
||||
{
|
||||
// 调用iOS原生方法打开URL
|
||||
if (Application.platform == RuntimePlatform.IPhonePlayer)
|
||||
{
|
||||
_openURL(url);
|
||||
}
|
||||
else
|
||||
{
|
||||
// 在非iOS平台上,你可以使用Unity的Application.OpenURL方法
|
||||
Application.OpenURL(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: dc89f3dbe2daac84a89a18c441e5d9b4
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -63,7 +63,7 @@ public class SaveingPotClass
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
return $"${amount:N}";
|
||||
return $"{amount:N}";
|
||||
//}
|
||||
}
|
||||
|
||||
|
||||
@@ -305,10 +305,10 @@ namespace ChillConnect
|
||||
}
|
||||
|
||||
|
||||
if (lastId == makeupVOModel.DataList.Last().id)
|
||||
{
|
||||
lastId = -1;
|
||||
}
|
||||
// if (lastId == makeupVOModel.DataList.Last().id)
|
||||
// {
|
||||
// lastId = -1;
|
||||
// }
|
||||
|
||||
foreach (var makeupVo in makeupVOModel.DataList)
|
||||
{
|
||||
@@ -430,6 +430,8 @@ namespace ChillConnect
|
||||
SaveingPotClass taskData = SaveData.GetSaveObject().saveingpot_history.Last();
|
||||
Makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(taskData.tableId);
|
||||
SaveData.GetSaveObject().saveingpot_ch += makeupVo.ADIncrease;
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.refreshGift);
|
||||
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.RefreshSaveingPot);
|
||||
if (ConfigSystem.GetConfig<CommonModel>().PiggyBankSwitch == 1 && GameHelper.IsGiftSwitch())
|
||||
{
|
||||
|
||||
@@ -70,6 +70,7 @@ namespace ChillConnect
|
||||
new TurnOffRewardsModel("TurnOffRewards"),
|
||||
new ExchangeDesModel("ExchangeDescriptors"),
|
||||
new AppOpenAdModel("SplashAD"),
|
||||
new ArrowGameConfigModel("ArrowGameConfig"),
|
||||
},
|
||||
state =>
|
||||
{
|
||||
@@ -124,6 +125,11 @@ namespace ChillConnect
|
||||
|
||||
#region 游戏配置
|
||||
|
||||
private void ParseArrowGameConfig()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void ParseGameConfig()
|
||||
{
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using DG.Tweening;
|
||||
using SGModule.Net;
|
||||
using SGModule.NetKit;
|
||||
|
||||
@@ -61,32 +62,32 @@ namespace ChillConnect
|
||||
else
|
||||
{
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
|
||||
//
|
||||
// void OnFail()
|
||||
// {
|
||||
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
// }
|
||||
|
||||
void OnFail()
|
||||
{
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
}
|
||||
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, (Action)OnFail);zhushi
|
||||
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, (Action)OnFail);
|
||||
//
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.NetLoadingUI_Close);
|
||||
//
|
||||
// float times = loginCount == 0 ? 0 : 5f;
|
||||
//
|
||||
// DOVirtual.DelayedCall(times,()=>{
|
||||
// if (loginCount < 5) {
|
||||
// loginCount++;
|
||||
// RequestLogin();
|
||||
//
|
||||
// } else {
|
||||
// loginCount = 0;
|
||||
// Action _OnFail = () =>
|
||||
// {
|
||||
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
// };
|
||||
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, _OnFail);
|
||||
// }
|
||||
// });
|
||||
|
||||
float times = loginCount == 0 ? 0 : 5f;
|
||||
|
||||
DOVirtual.DelayedCall(times,()=>{
|
||||
if (loginCount < 5) {
|
||||
loginCount++;
|
||||
RequestLogin();
|
||||
|
||||
} else {
|
||||
loginCount = 0;
|
||||
Action _OnFail = () =>
|
||||
{
|
||||
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
|
||||
};
|
||||
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.TipsViewUI_Open, _OnFail);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -34,21 +34,21 @@ 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为激励版本
|
||||
NCWWA6A0SDK_Manager.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初始化方法
|
||||
NCWWA6A0SDK_Manager.Instance.Init(null, null, GameConfig);
|
||||
|
||||
#endif
|
||||
}
|
||||
@@ -56,7 +56,7 @@ namespace ChillConnect
|
||||
|
||||
// public static bool CheckInterstitialReady()
|
||||
// {
|
||||
// return RgfCDfHLhn9WSDK_Utility.Instance.IsInterReady();
|
||||
// return NCWWA6A0SDK_Manager.Instance.IsInterReady();
|
||||
// }
|
||||
#region 插屏广告相关
|
||||
public static UnityAction<bool> onInterstitialAdCompleted;
|
||||
@@ -67,13 +67,13 @@ namespace ChillConnect
|
||||
// if (CheckInterstitialReady())
|
||||
// {
|
||||
// Debug.Log($"广告已经准备好,播放");
|
||||
// // RgfCDfHLhn9WSDK_Utility.Instance.ShowInter(placement, () =>
|
||||
// // {
|
||||
// // DOVirtual.DelayedCall(0.1f, () =>
|
||||
// // {
|
||||
onCompleted?.Invoke(true);
|
||||
// // });
|
||||
// // });
|
||||
// NCWWA6A0SDK_Manager.Instance.ShowInter(placement, () =>
|
||||
// {
|
||||
// DOVirtual.DelayedCall(0.1f, () =>
|
||||
// {
|
||||
// onCompleted?.Invoke(true);
|
||||
// });
|
||||
// });
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
@@ -126,21 +126,21 @@ namespace ChillConnect
|
||||
private static string _placement = "";
|
||||
// public static bool CheckRewardedReady()
|
||||
// {
|
||||
// return RgfCDfHLhn9WSDK_Utility.Instance.IsVideoReady();
|
||||
// return NCWWA6A0SDK_Manager.Instance.IsVideoReady();
|
||||
// }
|
||||
public static void ShowVideo(string placement = "DefaultVideo", UnityAction<bool> onCompleted = null)
|
||||
{
|
||||
onVideoAdCompleted = onCompleted;
|
||||
_placement = placement;
|
||||
// #if UNITY_EDITOR
|
||||
#if UNITY_EDITOR
|
||||
onVideoAdCompleted?.Invoke(true);
|
||||
// #else
|
||||
#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 =>
|
||||
// NCWWA6A0SDK_Manager.Instance.ShowRewardVideo(_placement, b =>
|
||||
// {
|
||||
// DOVirtual.DelayedCall(0.1f, () =>
|
||||
// {
|
||||
@@ -162,9 +162,10 @@ namespace ChillConnect
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Debug.Log($"广告未准备好,不播放");
|
||||
// onVideoAdCompleted?.Invoke(false);
|
||||
// }
|
||||
// #endif
|
||||
#endif
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -0,0 +1,915 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using ChillConnect;
|
||||
using FairyGUI;
|
||||
|
||||
using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
using DG.Tweening;
|
||||
using IgnoreOPS;
|
||||
using SGModule.NetKit;
|
||||
|
||||
namespace IgnoreOPS
|
||||
{
|
||||
|
||||
|
||||
public class WebviewManager : MonoBehaviour
|
||||
{
|
||||
// Vector2 startPos;
|
||||
// float lastTouchTime = 0f;
|
||||
// float touchInterval = 0.3f;
|
||||
// void Update()
|
||||
// {
|
||||
// #if UNITY_IOS && !UNITY_EDITOR
|
||||
// if(Input.touchCount > 0)
|
||||
// {
|
||||
// Touch touch_ = Input.GetTouch(0);
|
||||
//
|
||||
// if(touch_.phase == TouchPhase.Began)
|
||||
// {
|
||||
// startPos = touch_.position;
|
||||
// lastTouchTime = Time.time;
|
||||
// }
|
||||
// if(touch_.phase == TouchPhase.Ended)
|
||||
// {
|
||||
// if ((Time.time - lastTouchTime) < touchInterval){
|
||||
// // if (WebViewMgr.Instance.WebUIType == WebUIType.H5 && EventSystem.current.currentSelectedGameObject == null){
|
||||
// // BrigdeIOS.SetTouchWebview(true, true);
|
||||
// // }else{
|
||||
// // BrigdeIOS.SetTouchWebview(true);
|
||||
// // }
|
||||
// BrigdeIOS.SetClickView();
|
||||
// }
|
||||
// }
|
||||
// // if(touch_.phase == TouchPhase.Moved){
|
||||
// // Vector2 delta = touch_.position - startPos;
|
||||
// // // Debug.Log("delta Y: " + delta.y);
|
||||
// // BrigdeIOS.ScrollWebview(delta.x, delta.y);
|
||||
// // startPos = touch_.position;
|
||||
// // }
|
||||
// }
|
||||
// #endif
|
||||
// }
|
||||
public static WebviewManager Instance;
|
||||
public WebviewManager()
|
||||
{
|
||||
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)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetPadding");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.SetPadding(left, top, right, bottom);
|
||||
#endif
|
||||
}
|
||||
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 UNITY_IOS && !UNITY_EDITOR
|
||||
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
|
||||
}
|
||||
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
|
||||
BrigdeIOS.addH5Field(field1,field2,field3,field4,field5,field6,field7,dark_url,light_url,is_gift,web_through_str,click_add_time);
|
||||
#endif
|
||||
}
|
||||
public void ShowH5View(bool flag)
|
||||
{
|
||||
// Debug.Log("[WebviewManager] SetCTEnable");
|
||||
#if UNITY_IOS && !UNITY_EDITOR
|
||||
BrigdeIOS.ShowH5View(flag);
|
||||
#endif
|
||||
}
|
||||
|
||||
public void SetIconProgress(float val)
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
// 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(GameMsg.H5ViewClickBtn, name);
|
||||
}
|
||||
public void H5AutoRefresh(string times)
|
||||
{
|
||||
if (times == "") return;
|
||||
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
newDate = newDate.AddSeconds(GameHelper.GetNowTime(true));
|
||||
var newDays = newDate.Day;
|
||||
|
||||
|
||||
if (times == "Dailyrefreshtimes")
|
||||
{
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
|
||||
if (last_time == newDays)
|
||||
{
|
||||
var numbers = PlayerPrefs.GetInt("Dailyrefreshnum", 0);
|
||||
numbers++;
|
||||
PlayerPrefs.SetInt("Dailyrefreshnum", numbers);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
PlayerPrefs.SetInt("Dailyrefreshnum", 1);
|
||||
PlayerPrefs.SetInt("Dayreftimes", newDays);
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i].ToString();
|
||||
// }
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability, darkWVRefreshtime_str,
|
||||
darkWVDailyrefreshtimes_str, "", "", GameHelper.IsGiftSwitch(), "", "");
|
||||
}
|
||||
}
|
||||
else if (times.Contains("dark_Dailyrefreshtimes"))
|
||||
{
|
||||
var last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
|
||||
if (last_time == newDays)
|
||||
{
|
||||
// var numbers = PlayerPrefs.GetInt("dark_Dayref", 0);
|
||||
// numbers++;
|
||||
// PlayerPrefs.SetInt("dark_Dayref", numbers);
|
||||
string[] temp_arr = times.Split("|");
|
||||
if (temp_arr.Length >= 2)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref[Int32.Parse(temp_arr[1])]++;
|
||||
SaveData.saveDataFunc();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
// PlayerPrefs.SetInt("dark_Dayref", 1);
|
||||
string[] temp_arr = times.Split("|");
|
||||
if (temp_arr.Length >= 2)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref[Int32.Parse(temp_arr[1])] = 1;
|
||||
SaveData.saveDataFunc();
|
||||
}
|
||||
PlayerPrefs.SetInt("dark_refreshDay", newDays);
|
||||
string darkWVRefreshtime_str = "";
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
int dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i].ToString();
|
||||
// }
|
||||
|
||||
dark_type = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
}
|
||||
}
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability, darkWVRefreshtime_str,
|
||||
darkWVDailyrefreshtimes_str, "", "", GameHelper.IsGiftSwitch(), "", "");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
string[] temp_array = times.Split("|");
|
||||
if (temp_array.Length >= 2 && temp_array[0] != null && temp_array[0] != "")
|
||||
{
|
||||
if (temp_array[1] == "h5")
|
||||
{
|
||||
|
||||
H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h5" };
|
||||
NetApi.H5RefreshTimes<H5refreshTimes>(temp_array[0], "h5", (isSuccess, obj) =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
|
||||
int numbers = 0;
|
||||
for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
|
||||
{
|
||||
if (ConfigSystem.light_weblist[i].webLink == temp_array[0])
|
||||
{
|
||||
// Debug.Log("uuuuuuuuuuuuuuuuu明穿透" + temp_array[0] + "已经刷新了" + obj.times + "次" + "上限是" + ConfigSystem.light_weblist[i].refreshMax + "次");
|
||||
numbers = ConfigSystem.light_weblist[i].refreshMax - obj.times;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (numbers < 0) numbers = 0;
|
||||
upDataH5times(temp_array[0], numbers, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
H5sendClass info = new H5sendClass() { link = temp_array[0], type = "h6" };
|
||||
NetApi.H5RefreshTimes<H5refreshTimes>(temp_array[0], "h6", (isSuccess, obj) =>
|
||||
{
|
||||
if (isSuccess)
|
||||
{
|
||||
int numbers = 0;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (ConfigSystem.dark_weblist[i].webLink == temp_array[0])
|
||||
{
|
||||
// Debug.Log("uuuuuuuuuuuuuuuuu暗穿透" + temp_array[0] + "已经刷新了" + obj.times + "次" + "上限是" + ConfigSystem.dark_weblist[i].refreshMax + "次");
|
||||
numbers = ConfigSystem.dark_weblist[i].refreshMax - obj.times;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (numbers < 0) numbers = 0;
|
||||
upDataH5times(temp_array[0], numbers, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private GList select_glist;
|
||||
private float select_glist_y;
|
||||
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);
|
||||
TrackKit.SendEvent(Property.Event, Property.FlyCtNumber);
|
||||
|
||||
}
|
||||
|
||||
if (name == "rewardBtn")
|
||||
{
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_ct_number, 1);
|
||||
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.annular_ct_people,1);
|
||||
TrackKit.SendEvent(Property.Event, Property.AnnularCtNumber);
|
||||
|
||||
}
|
||||
|
||||
if (name == "finish")
|
||||
{
|
||||
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_finish_number, 1);
|
||||
TrackKit.SendEvent(Property.Event, Property.AnnularFinishNumber);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
string[] a = name.Split("|");
|
||||
if (a.Length < 2) return;
|
||||
if (!float.TryParse(a[0], out float x) || !float.TryParse(a[1], out float y))
|
||||
{
|
||||
Debug.LogError("Invalid format for coordinates: " + name);
|
||||
return;
|
||||
}
|
||||
|
||||
Vector2 fguiScreenPos = new(x * GRoot.inst.width, y * GRoot.inst.height);
|
||||
|
||||
// Debug.Log("mmmmmmmmmmmmmmmmmm" + a[0]);
|
||||
// Debug.Log("mmmmmmmmmmmmmmmmmm" + a[1]);
|
||||
// if (AppConst.DeviceLangue == "pt")
|
||||
// {
|
||||
// fguiScreenPos = new Vector2((float.Parse(a[0]) * GRoot.inst.width) / 1000000.0f,
|
||||
// float.Parse(a[1]) * GRoot.inst.height / 1000000.0f);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
|
||||
//}
|
||||
GButton objUnderPoint = null;
|
||||
|
||||
var child_array = GRoot.inst.GetChildren().Reverse();
|
||||
bool click_card = true;
|
||||
foreach (GComponent child in child_array) //normal
|
||||
{
|
||||
if (child.GetChildren().Length > 0)
|
||||
{
|
||||
var com_array = child.GetChildren().Reverse();
|
||||
foreach (GComponent com_child in com_array) //com_层面
|
||||
{
|
||||
if (child.name == "Popup" || child.name == "Highest")
|
||||
{
|
||||
click_card = false;/* */
|
||||
}
|
||||
var btn_array = com_child.GetChildren();
|
||||
for (int i = btn_array.Length - 1; i >= 0; i--) //btn_层面
|
||||
{
|
||||
// if (btn_array[i] .name=="btn_collect")
|
||||
// {
|
||||
// Debug.Log(btn_array[i].x);
|
||||
// Debug.Log(btn_array[i].y);
|
||||
// Debug.Log(fguiScreenPos.x);
|
||||
// Debug.Log(fguiScreenPos.y);
|
||||
// Debug.Log(btn_array[i].position.x <= fguiScreenPos.x &&
|
||||
// fguiScreenPos.x <= btn_array[i].position.x + btn_array[i].width);
|
||||
// Debug.Log( btn_array[i].position.y <= fguiScreenPos.y &&
|
||||
// fguiScreenPos.y <= btn_array[i].position.y + btn_array[i].height);
|
||||
// }
|
||||
|
||||
if (btn_array[i] is GButton)
|
||||
{
|
||||
GButton temp = btn_array[i] as GButton;
|
||||
|
||||
if (temp.onStage && temp.visible && temp.position.x <= fguiScreenPos.x &&
|
||||
fguiScreenPos.x <= temp.position.x + temp.width &&
|
||||
temp.position.y <= fguiScreenPos.y &&
|
||||
fguiScreenPos.y <= temp.position.y + temp.height)
|
||||
{
|
||||
objUnderPoint = btn_array[i] as GButton;
|
||||
if (objUnderPoint.enabled)
|
||||
{
|
||||
objUnderPoint.FireClick(true, true);
|
||||
}
|
||||
else objUnderPoint.FireClick(true, false);
|
||||
goto EndLoop;
|
||||
}
|
||||
}
|
||||
|
||||
else if (btn_array[i] is GTextInput)
|
||||
{
|
||||
|
||||
GTextInput temp = btn_array[i] as GTextInput;
|
||||
if (temp.onStage && temp.visible && temp.position.x <= fguiScreenPos.x &&
|
||||
fguiScreenPos.x <= temp.position.x + temp.width &&
|
||||
temp.position.y <= fguiScreenPos.y &&
|
||||
fguiScreenPos.y <= temp.position.y + temp.height)
|
||||
{
|
||||
|
||||
temp.RequestFocus();
|
||||
goto EndLoop;
|
||||
}
|
||||
|
||||
}
|
||||
else if (btn_array[i] is GList)
|
||||
{
|
||||
|
||||
GList temp = btn_array[i] as GList;
|
||||
if (temp.onStage && temp.visible && temp.position.x <= fguiScreenPos.x &&
|
||||
fguiScreenPos.x <= temp.position.x + temp.width &&
|
||||
temp.position.y <= fguiScreenPos.y &&
|
||||
fguiScreenPos.y <= temp.position.y + temp.height)
|
||||
{
|
||||
if (select_glist == null)
|
||||
{
|
||||
select_glist_y = fguiScreenPos.y;
|
||||
select_glist = btn_array[i] as GList;
|
||||
}
|
||||
else
|
||||
{
|
||||
select_glist.scrollPane.posY -= (fguiScreenPos.y - select_glist_y);
|
||||
select_glist_y = fguiScreenPos.y;
|
||||
}
|
||||
|
||||
goto EndLoop;
|
||||
}
|
||||
|
||||
}
|
||||
// else if (btn_array[i] is GImage)
|
||||
// {
|
||||
// GImage temp = btn_array[i] as GImage;
|
||||
// if (temp.onStage && temp.visible && temp.position.x <= fguiScreenPos.x &&
|
||||
// fguiScreenPos.x <= temp.position.x + temp.width &&
|
||||
// temp.position.y <= fguiScreenPos.y &&
|
||||
// fguiScreenPos.y <= temp.position.y + temp.height)
|
||||
// {
|
||||
// if (temp.onClick != null)
|
||||
// {
|
||||
// // 触发图片的点击事件
|
||||
// Debug.Log("TouchClickPoint 点击了图片: " + temp.name);
|
||||
// temp.DispatchEvent("click");
|
||||
// goto EndLoop;
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }
|
||||
else if (btn_array[i] is GComponent)
|
||||
{
|
||||
GComponent com = btn_array[i] as GComponent;
|
||||
|
||||
// 如果是 view_container_parent,专门处理它的子节点
|
||||
if (com.name == "view_container_parent")
|
||||
{
|
||||
Debug.Log($"TouchClickPoint 点击了组件 com.name: {com.name}");
|
||||
var children = com.GetChildren();
|
||||
Debug.Log($"TouchClickPoint 子组件数量: {children.Length}");
|
||||
for (int k = children.Length - 1; k >= 0; k--)
|
||||
{
|
||||
if (children[k] is GComponent childCom)
|
||||
{
|
||||
// 检测子组件是否为箭头
|
||||
Debug.Log($"TouchClickPoint childCom.name: {childCom.name}");
|
||||
|
||||
var childrens = childCom.GetChildren();
|
||||
Debug.Log($"TouchClickPoint 子子组件数量: {childrens.Length}");
|
||||
for (int l = childrens.Length - 1; l >= 0; l--)
|
||||
{
|
||||
if (childrens[l] is GComponent childComs)
|
||||
{
|
||||
if (childComs.name.StartsWith("Arrow_") &&
|
||||
childComs.onStage && childComs.visible)
|
||||
{
|
||||
// 在检测逻辑中添加调试日志
|
||||
Debug.Log($"箭头名称: {childComs.name}");
|
||||
Debug.Log($"箭头局部坐标: {childComs.position}");
|
||||
Debug.Log($"点击屏幕坐标: {fguiScreenPos}");
|
||||
Debug.Log($"箭头尺寸: {childComs.width} x {childComs.height}");
|
||||
|
||||
Debug.Log($"TouchClickPoint childComs.name: {childComs.name}");
|
||||
|
||||
// 将箭头的局部坐标转换为屏幕坐标(考虑容器拖动和缩放)
|
||||
Vector2 arrowScreenPos = childComs.LocalToGlobal(Vector2.zero);
|
||||
Debug.Log($"箭头屏幕坐标: {arrowScreenPos}");
|
||||
// 考虑缩放后的实际尺寸
|
||||
float actualWidth = childComs.width * childComs.scaleX;
|
||||
float actualHeight = childComs.height * childComs.scaleY;
|
||||
|
||||
// 中心点锚点的位置检测
|
||||
if ((arrowScreenPos.x - actualWidth/2) <= fguiScreenPos.x &&
|
||||
fguiScreenPos.x <= (arrowScreenPos.x + actualWidth/2) &&
|
||||
(arrowScreenPos.y - actualHeight/2) <= fguiScreenPos.y &&
|
||||
fguiScreenPos.y <= (arrowScreenPos.y + actualHeight/2)) {
|
||||
Debug.Log("TouchClickPoint 点击了箭头: " + childComs.name);
|
||||
childComs.DispatchEvent("OnClick");
|
||||
goto EndLoop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var child_btn_array = btn_array[i].asCom.GetChildren(); //嵌套的com
|
||||
|
||||
for (int j = child_btn_array.Length - 1; j >= 0; j--)
|
||||
{
|
||||
if (child_btn_array[j] is GButton)
|
||||
{
|
||||
Vector2 local_pos = new Vector2(btn_array[i].x + child_btn_array[j].x,
|
||||
btn_array[i].y + child_btn_array[j].y);
|
||||
if (child_btn_array[j].visible && child_btn_array[j].onStage && child_btn_array[j].visible && local_pos.x <= fguiScreenPos.x &&
|
||||
fguiScreenPos.x <= local_pos.x + child_btn_array[j].width &&
|
||||
local_pos.y <= fguiScreenPos.y && fguiScreenPos.y <=
|
||||
local_pos.y + child_btn_array[j].height)
|
||||
{
|
||||
objUnderPoint = child_btn_array[j] as GButton;
|
||||
if (objUnderPoint.enabled) objUnderPoint.FireClick(true, true);
|
||||
else objUnderPoint.FireClick(true, false);
|
||||
goto EndLoop;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
if (child.name == "Popup" || child.name == "Highest")
|
||||
{
|
||||
goto EndLoop;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
EndLoop: Debug.Log("");
|
||||
if (click_card)
|
||||
{
|
||||
Debug.Log("TouchClickPoint === click_card");
|
||||
if (orthoCamera == null) orthoCamera = GameObject.Find("GameCamera").GetComponent<Camera>();
|
||||
Ray ray = orthoCamera.ScreenPointToRay(new Vector2(float.Parse(a[0]) * Screen.width, (1 - float.Parse(a[1])) * Screen.height));
|
||||
RaycastHit hit;
|
||||
int layerMask = 1 << 6;
|
||||
|
||||
if (Physics.Raycast(ray, out hit, Mathf.Infinity, layerMask))
|
||||
{
|
||||
GameDispatcher.Instance.Dispatch(GameMsg.card_click, hit.collider.gameObject.name);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public Camera orthoCamera;
|
||||
|
||||
public static Dictionary<string, string> adCallbackInfo = new Dictionary<string, string>();
|
||||
public void SendH5Event(string numbers)
|
||||
{
|
||||
|
||||
// adCallbackInfo.Clear();
|
||||
// adCallbackInfo.Add("h5_revenue",ConfigSystem.GetConfig<CommonModel>().h5_refreshRevenue.ToString());
|
||||
// //Debug.Log("sssssssssssssssssss"+JsonConvert.SerializeObject(adCallbackInfo));
|
||||
// AppsFlyer.sendEvent("Growing_Total_01_002",adCallbackInfo);
|
||||
}
|
||||
|
||||
public void RefreshUrl()
|
||||
{
|
||||
|
||||
// if (gameUrlInfo == null) return;
|
||||
//TODO: show invisible h5
|
||||
var Dailyrefresh_reamain = 0;
|
||||
var last_time = PlayerPrefs.GetInt("Dayreftimes", 0);
|
||||
DateTime newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
newDate = newDate.AddSeconds(GameHelper.GetNowTime());
|
||||
var newDays = newDate.Day;
|
||||
|
||||
|
||||
|
||||
if (last_time == newDays)
|
||||
{
|
||||
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes -
|
||||
PlayerPrefs.GetInt("Dailyrefreshnum", 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerPrefs.SetInt("Dailyrefreshnum", 0);
|
||||
Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().Dailyrefreshtimes;
|
||||
PlayerPrefs.SetInt("Dayreftimes", newDays);
|
||||
}
|
||||
|
||||
int dark_last_time = PlayerPrefs.GetInt("dark_refreshDay", 0);
|
||||
|
||||
DateTime dark_newDate = TimeZone.CurrentTimeZone.ToLocalTime(new DateTime(1970, 1, 1));
|
||||
dark_newDate = dark_newDate.AddSeconds(GameHelper.GetNowTime());
|
||||
var dark_newDays = dark_newDate.Day;
|
||||
|
||||
|
||||
string darkWVDailyrefreshtimes_str = "";
|
||||
|
||||
|
||||
if (SaveData.GetSaveObject().dark_Dayref == null)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref = new List<int>() { 0, 0, 0, 0, 0, 0, 0, 0, 0 ,0,0};
|
||||
}
|
||||
|
||||
if (dark_last_time == dark_newDays)
|
||||
{
|
||||
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index) - 1] -
|
||||
// PlayerPrefs.GetInt("dark_Dayref", 0);
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i] - SaveData.GetSaveObject().dark_Dayref[i];
|
||||
|
||||
// }
|
||||
int dark_type_ = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
Debug.Log(dark_type_);
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes - SaveData.GetSaveObject().dark_Dayref[dark_type_ - 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// PlayerPrefs.SetInt("dark_Dayref", 0);
|
||||
for (int i = 0; i < SaveData.GetSaveObject().dark_Dayref.Count; i++)
|
||||
{
|
||||
SaveData.GetSaveObject().dark_Dayref[i] = 0;
|
||||
}
|
||||
SaveData.saveDataFunc();
|
||||
// dark_Dailyrefresh_reamain = ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[Int32.Parse(webview_index)];
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes.Length; i++)
|
||||
// {
|
||||
|
||||
// if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
// darkWVDailyrefreshtimes_str += ConfigSystem.GetConfig<CommonModel>().darkWVDailyrefreshtimes[i];
|
||||
|
||||
// }
|
||||
int dark_type_ = -1;
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type_ != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
dark_type_ = ConfigSystem.dark_weblist[i].wvType;
|
||||
if (i != 0) darkWVDailyrefreshtimes_str += "|";
|
||||
darkWVDailyrefreshtimes_str += ConfigSystem.dark_weblist[i].darkWVDailyrefreshtimes;
|
||||
}
|
||||
}
|
||||
PlayerPrefs.SetInt("dark_refreshDay", dark_newDays);
|
||||
}
|
||||
|
||||
// var last_login_time = PlayerPrefs.GetInt("last_login_time", 0);//获取上次登录日期
|
||||
// PlayerPrefs.SetInt("last_login_time", newDays);
|
||||
|
||||
string light_str = "";
|
||||
string dark_str = "";
|
||||
|
||||
for (int i = 0; i < ConfigSystem.light_weblist.Count; i++)
|
||||
{
|
||||
int can_refresh_numbners = 0;
|
||||
// if (last_login_time==newDays)
|
||||
// {
|
||||
// can_refresh_numbners=ConfigSystem.light_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.light_weblist[i].webLink, 0);
|
||||
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
can_refresh_numbners = ConfigSystem.light_weblist[i].refreshMax;
|
||||
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
||||
// PlayerPrefs.SetInt(ConfigSystem.light_weblist[i].webLink, 0);
|
||||
// }
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
light_str += "|";
|
||||
}
|
||||
|
||||
light_str += ConfigSystem.light_weblist[i].webLink + "#" + ConfigSystem.light_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.light_weblist[i].darkWebTimesCT; ;
|
||||
}
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
int can_refresh_numbners = 0;
|
||||
// if (last_login_time==newDays)
|
||||
// {
|
||||
// can_refresh_numbners=ConfigSystem.dark_weblist[i].refreshMax- PlayerPrefs.GetInt(ConfigSystem.dark_weblist[i].webLink, 0);
|
||||
// if (can_refresh_numbners < 0) can_refresh_numbners = 0;
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
can_refresh_numbners = ConfigSystem.dark_weblist[i].refreshMax;
|
||||
//if (can_refresh_numbners < 0) can_refresh_numbners = 9999999;
|
||||
// PlayerPrefs.SetInt(ConfigSystem.dark_weblist[i].webLink, 0);
|
||||
// }
|
||||
|
||||
if (i != 0)
|
||||
{
|
||||
dark_str += "|";
|
||||
}
|
||||
|
||||
dark_str += ConfigSystem.dark_weblist[i].webLink + "#" + ConfigSystem.dark_weblist[i].probability + "#" + can_refresh_numbners + "#" + ConfigSystem.dark_weblist[i].darkWebTimesCT + "#" + ConfigSystem.dark_weblist[i].wvType + "#" + ConfigSystem.dark_weblist[i].WVOffset ;
|
||||
}
|
||||
|
||||
|
||||
string darkWVRefreshtime_str = "";
|
||||
|
||||
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime.Length; i++)
|
||||
// {
|
||||
// if (i != 0) darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime[i].ToString();
|
||||
// }
|
||||
// for (int i = 0; i < ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2.Length; i++)
|
||||
// {
|
||||
// darkWVRefreshtime_str += "|";
|
||||
// darkWVRefreshtime_str += ConfigSystem.GetConfig<CommonModel>().darkWVRefreshtime2[i].ToString();
|
||||
// }
|
||||
int dark_type = -1;
|
||||
string add_time = "";
|
||||
for (int i = 0; i < ConfigSystem.dark_weblist.Count; i++)
|
||||
{
|
||||
if (dark_type != ConfigSystem.dark_weblist[i].wvType)
|
||||
{
|
||||
if (i != 0)
|
||||
{
|
||||
darkWVRefreshtime_str += "|";
|
||||
add_time += "|";
|
||||
}
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[0];
|
||||
darkWVRefreshtime_str += "|";
|
||||
darkWVRefreshtime_str += ConfigSystem.dark_weblist[i].darkWVRefreshtime[1];
|
||||
dark_type = ConfigSystem.dark_weblist[i].wvType;
|
||||
add_time += ConfigSystem.dark_weblist[i].WVClickAddTime;
|
||||
}
|
||||
}
|
||||
Debug.Log("--------------------------------");
|
||||
|
||||
// add_time+= ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[0] + "|" + ConfigSystem.GetConfig<CommonModel>().WVClickAddTime[1];
|
||||
|
||||
Debug.Log(add_time);
|
||||
Debug.Log(darkWVRefreshtime_str);
|
||||
Debug.Log(darkWVDailyrefreshtimes_str);
|
||||
Debug.Log(dark_str);
|
||||
Debug.Log(ConfigSystem.web_through_str);
|
||||
WebviewManager.Instance.addH5Field(ConfigSystem.GetConfig<CommonModel>().flyCtRate, ConfigSystem.GetConfig<CommonModel>().otherH5switch,
|
||||
ConfigSystem.GetConfig<CommonModel>().H5Refreshtime, Dailyrefresh_reamain, ConfigSystem.GetConfig<CommonModel>().darkThoughProbability
|
||||
, darkWVRefreshtime_str, darkWVDailyrefreshtimes_str, dark_str, light_str, GameHelper.IsGiftSwitch(), ConfigSystem.web_through_str, add_time);
|
||||
// WebviewManager.Instance.OpenWebView(gameUrlInfo.webLink);
|
||||
|
||||
//WebviewManager.Instance.setFlyCtRate(ConfigSystem.GetConfig<CommonModel>().flyCtRate);
|
||||
// RefreshDataCT(isTop, gameUrlInfo);
|
||||
}
|
||||
|
||||
public void ClickAdEvent(string ad_msg)
|
||||
{
|
||||
string[] temp_array = ad_msg.Split("|");
|
||||
if (temp_array.Length >= 2 && temp_array[0] != null && temp_array[0] != "")
|
||||
{
|
||||
H5sendClass info = new H5sendClass() { link = temp_array[0], type = temp_array[1] };
|
||||
// NetApi.SetClickAdEvent<object>(temp_array[0], temp_array[1], (isSuccess, obj) =>
|
||||
// {
|
||||
// // if (isSuccess)
|
||||
// // {
|
||||
// // Debug.Log("dadianchenggong" + temp_array[0]);
|
||||
// // }
|
||||
// });
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public static bool haveSimCard = false;
|
||||
public void diaoyongtest(string have)
|
||||
{
|
||||
if (have == "TRUE") haveSimCard = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public class H5refreshTimes
|
||||
{
|
||||
public string link;
|
||||
public int times;
|
||||
|
||||
}
|
||||
public class H5sendClass
|
||||
{
|
||||
public string link;
|
||||
public string type;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: a70e3d36bc7e411458b991b090e147d5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user