fix:1、sdk更换。2、修复bug

This commit is contained in:
2026-07-07 14:03:12 +08:00
parent 63b530f245
commit e3b0b9b008
1617 changed files with 134668 additions and 62343 deletions
+6 -2
View File
@@ -13,14 +13,14 @@ public class ChillConnectRoot : MonoBehaviour
{
public void Awake()
{
#if UNITY_EDITOR || GAME_RELEASE
#if UNITY_EDITOR || GAME_RELEASE || GAME_RELEASE1
GameObject ingameDebugConsole = GameObject.Find("IngameDebugConsole");
if (ingameDebugConsole != null) ingameDebugConsole.SetActive(false);
#endif
// NetworkKit.Instance.InitData(ConfigManager.GameConfig.packageName, ConfigManager.GameConfig.isRelease);
SdkConfigMgr.Init();
// SdkConfigMgr.Init();
MaxADKit.Init();
@@ -36,6 +36,10 @@ public class ChillConnectRoot : MonoBehaviour
public static void OnLauncher()
{
Language.LoadLocalizedText();
Language.Initialize();
AppObjConst.FrameGo = new GameObject($"{AppObjConst.FrameGoName}");
AppObjConst.FrameGo.AddComponent<ChillConnectCore>();
DontDestroyOnLoad(AppObjConst.FrameGo);
+3
View File
@@ -41,4 +41,7 @@ public static partial class DataKeys
public const string ArrowDarkTheme = "ArrowDarkTheme"; //箭头游戏的黑夜模式(0:黑夜,1:白天)
public const string ArrowTheme = "ArrowTheme"; //箭头游戏的主题(0:黑色 1:虫子 2:彩色)
public const string ArrowChProgress = "ArrowChProgress"; //箭头cash 进度
public const string selectLanguage = "selectLanguage";
}
+1
View File
@@ -77,6 +77,7 @@ public static partial class DataMgr
public static DataStorage<int> ArrowDarkTheme = BindDataStorage<int>(DataKeys.ArrowDarkTheme,@default: 1);
public static DataStorage<int> ArrowTheme = BindDataStorage<int>(DataKeys.ArrowTheme,@default: 0);
public static DataStorage<int> ArrowChProgress = BindDataStorage<int>(DataKeys.ArrowChProgress,@default: 0);
public static DataStorage<int> selectLanguage = BindDataStorage<int>(DataKeys.selectLanguage, null, -1);
#endregion
+4 -4
View File
@@ -76,10 +76,10 @@ namespace ChillConnect
{
AppDispatcher.Instance.Dispatch(AppMsg.AppManagerRegister);
AppDispatcher.Instance.Dispatch(AppMsg.InitUIMgr);
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
// #if UNITY_EDITOR
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
// #endif
// NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
#if UNITY_EDITOR
NetworkDispatcher.Instance.Dispatch(NetworkMsg.Login);
#endif
AppDispatcher.Instance.AddListener(AppMsg.LoginInit, OnLoadingComplete);
// DataMgr.InitPreferences();
@@ -764,7 +764,7 @@ namespace ChillConnect
{
if (AppConst.IsMultiLangue)
{
Stage.inst.currLang = AppConst.InternalLangue;
Stage.inst.currLang = Language.getCurrentLanguage();
}
}
@@ -116,7 +116,7 @@ namespace ChillConnect
uiInfo.layerType = UILayerType.Bottom;
uiInfo.isNeedOpenAnim = false;
uiInfo.isNeedCloseAnim = false;
uiInfo.isNeedUIMask = true;
uiInfo.isNeedUIMask = false;
uiInfo.isTickUpdate = true;
}
@@ -387,8 +387,6 @@ namespace ChillConnect
}
GameHelper.IsShowFirstReward();
GameHelper.IsShowPettyReward();
GameHelper.ShowStatementView();
}
@@ -610,6 +608,11 @@ namespace ChillConnect
private void PopMakeup()
{
var makeupTaskData = DataMgr.MakeupTaskHistory.Value.Last();
Debug.Log($"makeupTaskData============{DataMgr.MakeupTaskHistory.Value.Count} {makeupTaskData.tableId}");
if (DataMgr.MakeupTaskHistory.Value.Count > 0 && makeupTaskData.tableId <= 0)
{
makeupTaskData.tableId = DataMgr.MakeupTaskHistory.Value.Count;
}
var vo = ConfigSystem.GetConfig<MakeupModel>().GetData(makeupTaskData.tableId);
if (vo == null)
{
@@ -639,23 +642,41 @@ namespace ChillConnect
{
ui.btn_wv.visible = false;
}
ui.btn_wv.SetClick(() =>
{
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = true,
url = ""
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
});
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); });
ui.btn_signin.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SignInUI_Open); });
if (ConfigSystem.GetConfig<CommonModel>().StatementSwitch == 1)
{
ui.btn_statement.SetClick(() =>
{
uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open);
});
}
else
{
HallManager.Instance.openTipsTimes++;
ui.btn_statement.visible = false;
}
ui.btn_statement.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.StatementViewUI_Open); });
ui.btn_saveingpot.SetClick(() => { uiCtrlDispatcher.Dispatch(UICtrlMsg.SaveingPotUI_Open); });
@@ -1975,7 +1996,6 @@ namespace ChillConnect
/// </summary>
private void DisappearLineGetReward()
{
return;
if (!GameHelper.IsGiftSwitch()) return;
bool isGet = false;
@@ -2010,8 +2030,10 @@ namespace ChillConnect
var start = fguiPosition;
var end = GameHelper.GetUICenterPosition(ui.com_money.GetChild("text_gold"));
float[] cash_array = GameHelper.GetRewardValue(0);
Debug.Log($"小额奖励:{cash_array[0]}");
var rewardSingleData = new RewardSingleData(102, (decimal)cash_array[0], RewardOrigin.AdTask)
var littleReward = GameHelper.GetExchangeRateVo().Multi * cash_array[0];
Debug.Log($"小额奖励:{cash_array[0]} {littleReward}");
var rewardSingleData = new RewardSingleData(102, (decimal)littleReward, RewardOrigin.AdTask)
{
startPosition = start,
endPosition = new Vector2(end.x - 135, end.y - 135)
@@ -77,10 +77,7 @@ namespace ChillConnect
if (ConfigSystem.GetConfig<exBrPoolModel>() == null) return;
config_name_list = ConfigSystem.GetConfig<exBrPoolModel>().config_name_list;
config_money_list = ConfigSystem.GetConfig<exBrPoolModel>().config_money_list;
GameDispatcher.Instance.AddListener(GameMsg.hideBroadCast, hideEvent);
GameDispatcher.Instance.AddListener(GameMsg.showBroadCast, showEvent);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.MainUI_Open, Setbuttom);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.RainPlayUI_Open, Settop);
}
protected override void OnOpen(object args)
@@ -99,11 +96,17 @@ namespace ChillConnect
#region
protected override void AddListener()
{
GameDispatcher.Instance.AddListener(GameMsg.hideBroadCast, hideEvent);
GameDispatcher.Instance.AddListener(GameMsg.showBroadCast, showEvent);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.MainUI_Open, Setbuttom);
UICtrlDispatcher.Instance.AddListener(UICtrlMsg.RainPlayUI_Open, Settop);
}
protected override void RemoveListener()
{
GameDispatcher.Instance.RemoveListener(GameMsg.hideBroadCast, hideEvent);
GameDispatcher.Instance.RemoveListener(GameMsg.showBroadCast, showEvent);
UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.MainUI_Open, Setbuttom);
UICtrlDispatcher.Instance.RemoveListener(UICtrlMsg.RainPlayUI_Open, Settop);
}
#endregion
private int time_count = 11;
@@ -73,7 +73,7 @@ namespace ChillConnect
ui.btn_login.SetClick(OnClickBtn, true);
App.HideLoadingUI();
ui.text_privacy_user.text_privacy_user.SetClick(OnClickPrivacy);
ui.text_privacy_user.text_privacy_user.SetClick(OnClickTerms);
ui.text_privacy_user.text_privacy_user.onClickLink.Add(content =>
{
switch (content.data)
@@ -86,17 +86,20 @@ namespace ChillConnect
break;
}
});
// Action closeCallback = null;
// var meteor = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla1, Fx_Type.meteor, ref closeCallback);
// meteor.state.SetAnimation(0, "liziguang1", true);
// var login = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla, Fx_Type.login, ref closeCallback);
// login.state.SetAnimation(0, "animation", true);
// var lantern = FXManager.Instance.SetFx<SkeletonAnimation>(ui.pla1, Fx_Type.lantern, ref closeCallback);
// lantern.state.SetAnimation(0, "deng", true);
ui.text_privacy_user.text_privacy_user1.SetClick(OnClickPrivacy);
ui.text_privacy_user.text_privacy_user1.onClickLink.Add(content =>
{
switch (content.data)
{
case "link_href":
OnClickTerms();
break;
case "link_href1":
OnClickPrivacy();
break;
}
});
ui.btn_space.SetClick(OnclickSpace);
ui.btn_error.SetClick(OnClickError);
@@ -117,7 +120,7 @@ namespace ChillConnect
// Debug.Log("OnclickSpace");
#if !UNITY_EDITOR
numbers++;
if(numbers>5) MaxSdk.ShowMediationDebugger();
// if(numbers>5) MaxSdk.ShowMediationDebugger();
#endif
}
int[] test = new int[5];
@@ -136,7 +139,9 @@ if(numbers>5) MaxSdk.ShowMediationDebugger();
CtrlDispatcher.Instance.Dispatch(CtrlMsg.Game_Start);
CtrlCloseUI();
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.GameLoginUI_Close);
}
private void OnClickPrivacy()
{
+4 -179
View File
@@ -6,6 +6,7 @@ using FGUI.ZM_H5_15;
using IgnoreOPS;
using SGModule.NetKit;
using UnityEngine;
using UNSDK;
namespace ChillConnect
{
@@ -39,21 +40,12 @@ namespace ChillConnect
protected override void OnClose()
{
SdkConfigMgr.Instance.Close();
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
GameDispatcher.Instance.Dispatch(GameMsg.showBroadCast);
HallManager.Instance.SetCameraVisible(true);
if (_config.normal)
{
// WebviewManager.Instance.setInH5View(false);
// WebviewManager.Instance.ShowH5View(false);
}
else
{
// FreeWebViewManager.Instance.CloseWeb();
}
}
@@ -65,24 +57,9 @@ namespace ChillConnect
private SDKOpenConfig _config;
protected override void OnOpenBefore(object args)
{
if (args is not SDKOpenConfig openConfig) return;
_config = openConfig;
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, false);
// 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);
@@ -122,163 +99,11 @@ namespace ChillConnect
//初始化页面逻辑
private void InitView()
{
// ui.btn_out.SetClick(() =>
// {
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.MakeupConfirmUI_Open);
// });
}
public void ClickBtn(string name)
{
// // Debug.Log("[UNITY] Click btn: " + name);
// FGUIHelper.PlayClickSound();
if (name == "flyBtn")
{
OnClickFlyCash();
//NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior,BuriedPointEvent.collect_fly_people,1);
// TrackKit.SendEvent(HallBehaviorTrack.Event, HallBehaviorTrack.Property.collect_fly_number);
TrackKit.SendEvent(Property.Event, Property.CollectFlyNumber);
}
else if (name == "rewardBtn")
{
OnClickIcon();
}
}
private void OnClickFlyCash()
{
// PreferencesMgr.Instance.AdCashFlyShowTime =
// GameHelper.GetNowTime() + ConfigSystem.GetConfig<CommonModel>().flyCD;
// var rewardData = new RewardData();
// var singleValue =
// (decimal)Math.Round(
// UnityEngine.Random.Range(ConfigSystem.GetConfig<CommonModel>().flyReward[0],
// ConfigSystem.GetConfig<CommonModel>().flyReward[1]), 2);
// decimal rewardValue;
// if (flyClickCount >= flyNeedClickCount)
// {
// flyClickCount = -1;
// //var rate = GameHelper.GetVideoRate();
// rewardValue = singleValue;
// GameHelper.ShowVideoAd("reward_fly", isCompleted =>
// {
// if (isCompleted)
// {
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
// }
// });
// }
// else
// {
// rewardValue = singleValue;
// }
// var startPosition = GameHelper.GetUICenterPosition(ui.com_fly);
// var endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num);
// var rewardSingleData = new RewardSingleData(102, rewardValue, RewardOrigin.H5Fly101)
// {
// startPosition = startPosition,
// endPosition = new Vector2(endPosition.x - 150, endPosition.y - 106)
// };
// rewardData.AddReward(rewardSingleData);
// rewardData.displayType = RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
// rewardData.AddCompleted(isSuccess =>
// {
// if (isSuccess)
// {
// flyClickCount++;
// }
// SetMakeup();
// });
// //GameHelper.addMoney((float)rewardValue);
// GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
// CheckShowFly();
}
private void OnClickIcon()
{
// //WebThroughUtil.WebThroughClick(H5WebThroughType.OnlineH5, ui.btn_icon);
// if (iconTime < ConfigSystem.GetConfig<CommonModel>().ThroughRewardCD)
// {
// return;
// }
// #if UNITY_IOS && !UNITY_EDITOR
// WebviewManager.Instance.ShowH5View(false);
// #endif
// float[] cash_array = GameHelper.GetRewardValue(2);
// // var temp = new { is_success = true, cash_number = cash_array[0], rate = cash_array[1], is_level_success = false, is_h5_reward = true };
// SuccessData temp = new SuccessData();
// temp.IsWin = true;
// temp.cash_number = cash_array[0];
// temp.rate = (int)cash_array[1];
// temp.IsLevelSuccess = false;
// temp.IsH5Reward = true;
// UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.LevelSuccessUI_Open, temp);
// //UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.RewardUI_Open);
// // var rewardData = new RewardData();
// // var rewardType = 111;
// // decimal rewardValue = (decimal)GameHelper.GetRewardValue(3)[0];
// // var rewardSingleData = new RewardSingleData(rewardType, rewardValue, RewardOrigin.H5Icon)
// // {
// // startPosition = GameHelper.GetUICenterPosition(ui.btn_icon),
// // endPosition = GameHelper.GetUICenterPosition(ui.com_top.text_num)
// // };
// // rewardData.AddReward(rewardSingleData);
// // rewardData.AddCompleted(isSuccess =>
// // {
// // ui.btn_icon.cont_state.selectedIndex = btn_icon.State_none;
// // iconTime = 0;
// // SetMakeup();
// // });
// // rewardData.condition = RewardCondition.AD;
// // rewardData.displayType =
// // RewardDisplayType.Dialog | RewardDisplayType.RewardFly | RewardDisplayType.ValueChange;
// // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// // GameHelper.addMoney((float)rewardValue);
// // GameDispatcher.Instance.Dispatch(GameMsg.GetReward, rewardData);
// // GameDispatcher.Instance.Dispatch(GameMsg.RefreshMakeupData);
// iconTime = 0;
// // SetMakeup();
// NetworkKit.BuriedPoint(BuriedPointEvent.Hall_behavior, BuriedPointEvent.annular_get_number, 1);
}
private void CheckShowFly()
{
// var nowTime = GameHelper.GetNowTime();
// var leftTime = (int)(PreferencesMgr.Instance.AdCashFlyShowTime - nowTime);
// ui.com_fly.visible = false;
// ui.com_fly.visible = leftTime <= 0;
// if (leftTime > 0)
// {
// WebviewManager.Instance.ShowFlyBtn(false);
// isFlyShow = false;
// }
// else
// {
// //StartFly();
// if (!isFlyShow) WebviewManager.Instance.ShowFlyBtn(true);
// isFlyShow = true;
// }
}
}
}
+1 -1
View File
@@ -64,7 +64,7 @@ namespace ChillConnect
}
void OnH5ClickBtn(object arg)
{
ui?.ClickBtn((string)arg);
// ui?.ClickBtn((string)arg);
}
protected override void AddServerListener()
{
+8 -1
View File
@@ -51,7 +51,14 @@ namespace ChillConnect
}
protected override void OnOpenBefore(object args)
{
{
var lang = PlayerPrefsKit.ReadString("LangIdKey");
if (lang.IsNullOrWhiteSpace())
{
lang = "en";
}
UIManager.Instance.SetSwitchLanguage(lang);
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenBgUI_Open);
ui.com_pb.max = 100;
ui.com_pb.value = 0;
@@ -118,6 +118,9 @@ namespace ChillConnect
ui.text_chdate3.text = GameHelper.getDesByKey("makeup_11");
ui.text_rate1.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
updateSpeedCD();
InitView();
initButtom();
@@ -984,7 +987,7 @@ namespace ChillConnect
value += makeupTaskData.rdData[i].coupon_mount;
}
}
ui.lab_mn.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn.text = GameHelper.Get102Str(vo.item_need - value);
ui.list_kicket.itemRenderer = refreshItem;
ui.list_kicket.numItems = makeupTaskData.rdData.Count;
@@ -1041,7 +1044,7 @@ namespace ChillConnect
ui.lab_mn2.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_ticket.text = GameHelper.GetPriceInt(makeupTaskData.lastRdData.coupon_mount);
ui.lab_code.text = makeupTaskData.lastRdData.code;
ui.btn_back.SetClick(() =>
{
ui.cont_state.selectedIndex = 6;
@@ -1057,13 +1060,13 @@ namespace ChillConnect
ui.btn_contact_us.SetClick(() =>
{
// GameHelper.OpenEmail();
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = false,
url = vo.T_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
// SDKOpenConfig openConfig = new SDKOpenConfig
// {
// normal = false,
// url = vo.T_ShopURL
// };
//
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
});
+29 -15
View File
@@ -52,22 +52,25 @@ namespace ChillConnect
try
{
// 添加空值检查,防止 NullReferenceException
var makeupTaskHistory = DataMgr.MakeupTaskHistory?.Value;
if (makeupTaskHistory != null && makeupTaskHistory.Any())
if (DataMgr.MakeupTaskHistory != null)
{
var makeupTaskData = makeupTaskHistory.Last();
var config = ConfigSystem.GetConfig<MakeupModel>();
if (config != null)
var makeupTaskHistory = DataMgr.MakeupTaskHistory?.Value;
if (makeupTaskHistory != null && makeupTaskHistory.Any())
{
var vo = config.GetData(makeupTaskData.tableId);
if (vo != null && ui?.text_level_limit != null)
var makeupTaskData = makeupTaskHistory.Last();
var config = ConfigSystem.GetConfig<MakeupModel>();
if (config != null)
{
var stage= vo.levels_need - GameHelper.GetLevel();
if(stage <= 0)
var vo = config.GetData(makeupTaskData.tableId);
if (vo != null && ui != null && ui.text_level_limit != null)
{
stage = 1;
var stage = vo.levels_need - GameHelper.GetLevel();
if (stage <= 0)
{
stage = 1;
}
ui.text_level_limit.SetVar("x", stage.ToString()).FlushVars();
}
ui.text_level_limit.SetVar("x", stage.ToString()).FlushVars();
}
}
}
@@ -79,7 +82,11 @@ namespace ChillConnect
}
InitView();
// 添加 ui 空值检查
if (ui != null)
{
InitView();
}
}
@@ -107,16 +114,23 @@ namespace ChillConnect
}
#endregion
//初始化页面逻辑`
//初始化页面逻辑
private void InitView()
{
// 添加空值检查
if (ui == null || ui.t0 == null)
{
return;
}
ui.t0.Play(() =>
{
DOVirtual.DelayedCall(0.2f, () =>
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
if (UICtrlDispatcher.Instance != null)
{
UICtrlDispatcher.Instance.Dispatch(UICtrlMsg.OpenGameUI_Close);
}
});
});
@@ -39,7 +39,6 @@ namespace ChillConnect
protected override void OnClose()
{
SaveData.saveDataFunc();
GameDispatcher.Instance.Dispatch(GameMsg.StopArrowTouch, true);
@@ -91,7 +90,7 @@ namespace ChillConnect
_mLastState = SaveData.GetSaveObject().PettyState;
// Debug.Log($"PettyState============: {SaveData.GetSaveObject().PettyState}");
var num = GameHelper.GetCommonModel().SmallReward;
ui.com_get_panel.text_reward.text = $"{GameHelper.Get102Str(num)} USD";
ui.com_get_panel.text_reward.text = $"{GameHelper.GetExchangeRateVo().Payicon}{GameHelper.Get102Str(num)}";
ui.com_get_panel.btn_get.SetClick(GotoEnterAccount);
@@ -123,6 +122,8 @@ namespace ChillConnect
ui.state.selectedIndex = 1;
SaveData.GetSaveObject().PettyState = 1;
ui.anim.visible = false;
SaveData.saveDataFunc();
};
});
@@ -170,6 +171,8 @@ namespace ChillConnect
}
ui.com_account.btn_confirm.SetClick(ConfirmClick);
SaveData.saveDataFunc();
}
private void ConfirmClick()
@@ -206,6 +209,8 @@ namespace ChillConnect
SaveData.GetSaveObject().PettyLastName = lname;
GotoSecondConfirm(account, fname, lname);
SaveData.saveDataFunc();
}
@@ -312,6 +317,8 @@ namespace ChillConnect
CtrlCloseUI();
});
}
SaveData.saveDataFunc();
}
@@ -72,13 +72,13 @@ 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);
// SDKOpenConfig openConfig = new SDKOpenConfig
// {
// normal = false,
// url = ConfigSystem.GetConfig<CommonModel>().X_ShopURL
// };
//
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb, openConfig);
CtrlCloseUI();
});
+18 -12
View File
@@ -105,7 +105,7 @@ namespace ChillConnect
{
ui.text_num.text = GameHelper.Get102Str(value);
ui.btn_collect.title = "" + GameHelper.Get102Str((decimal)value);
ui.btn_collect.title = "" + GameHelper.getChString((decimal)value);
}
else
{
@@ -170,14 +170,18 @@ namespace ChillConnect
}
cash_num = value;
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
// var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
var src = "(" ;
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
{
rate_idnex++;
ui.btn_multi.title = src + cash_num * boost_array[rate_idnex % 5] + ")";
var rewards = GameHelper.getChString(cash_num * boost_array[rate_idnex % 5]);
ui.btn_multi.title = src + rewards + ")";
});
ui.btn_multi.title = src + cash_num * boost_array[4] + ")";
ui.btn_multi.title = src + GameHelper.getChString(cash_num * boost_array[4]) + ")";
list_1 = new List<item_wheel>() { (ui.wheel.GetChild("wheel_") as wheel_).item_0, (ui.wheel.GetChild("wheel_") as wheel_).item_1, (ui.wheel.GetChild("wheel_") as wheel_).item_2, (ui.wheel.GetChild("wheel_") as wheel_).item_3, (ui.wheel.GetChild("wheel_") as wheel_).item_4, (ui.wheel.GetChild("wheel_") as wheel_).item_5, (ui.wheel.GetChild("wheel_") as wheel_).item_6, (ui.wheel.GetChild("wheel_") as wheel_).item_7, };
// list_1[2].img_light.visible = true;
@@ -302,11 +306,11 @@ 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://o9974uc5npswda'/>";
rewards = GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
}
var rewards = GameHelper.getChString((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
// if (!GameHelper.IsGiftSwitch()){
// src = "(<img src='ui://o9974uc5npswda'/>";
// rewards = GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]);
// }
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
{
@@ -363,11 +367,13 @@ namespace ChillConnect
// return;
// }
var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
// var src = GameHelper.IsGiftSwitch() ? "(" : "(<img src='ui://o9974uc5npswda'/>";
var src = "(" ;
(ui.wheel.GetChild("wheel_") as wheel_).t1.Play(() =>
{
rate_idnex++;
ui.btn_multi.title = src + GameHelper.Get101Str((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]) + ")";
ui.btn_multi.title = src + GameHelper.getChString((decimal)cash_num * boost_array[rate_idnex % boost_array.Length]) + ")";
});
(ui.wheel.GetChild("wheel_") as wheel_).t0.Play(Scroll);
@@ -108,6 +108,9 @@ namespace ChillConnect
ui.btn_watch.SetClick(WatchBtnClick);
AdRedeemManager.Instance.SetWatchAd(AdRedeemManager.SavingPotMakeupAd, ui.btn_task_watch as btn_watchAd, () => { });
AdRedeemManager.Instance.Start();
ui.text_rate1.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ui.text_rate.text = GameHelper.GetExchangeRateVo().Payicon + " 1";
ad_cool_down = ConfigSystem.GetConfig<CommonModel>().WwalaccelerationCD;
HallManager.Instance.UpdateSecondEvent += updateSpeedCD;
@@ -154,7 +157,6 @@ namespace ChillConnect
//初始化页面逻辑
private void InitView()
{
Debug.Log($"DataMgr.ExchangeAccount====={DataMgr.ExchangeAccount.Value}");
Makeup_2 makeupVo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(makeupTaskData.tableId);
ui.text_ad.text = string.Format(GameHelper.getDesByKey("saving_pot_5"), makeupVo.ADIncrease);
string str = string.Format(GameHelper.getDesByKey("saving_pot_2"), makeupVo.PayIncrease);
@@ -172,10 +174,12 @@ namespace ChillConnect
ui.text_chprogress.text = SaveingPotHelper.getChNumber(SaveData.GetSaveObject().saveingpot_ch) + "/" + SaveingPotHelper.getChNumber(makeupTaskData.amount);
ui.progress_ch.value = (SaveData.GetSaveObject().saveingpot_ch / makeupTaskData.amount) * 100;
ske_pot.SetActive(true);
Debug.Log("iiiiiiiiiiiiiiiiiiiii");
if (SaveData.GetSaveObject().saveingpot_ch < makeupTaskData.amount)
{
((btn_watchAd)ui.btn_ch).watch.text = "Go";
((btn_watchAd)ui.btn_ch).buy_state.selectedIndex = 0;
ui.btn_ch.SetClick(() => { });
ui.btn_ch.SetClick(() =>
{
GameHelper.ShowVideoAd("SaveingPotAd", isSuccess =>
@@ -189,12 +193,10 @@ namespace ChillConnect
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
{
@@ -202,6 +204,7 @@ namespace ChillConnect
btnWatchad.enabled = true;
btnWatchad.buy_state.selectedIndex = 1;
btnWatchad.title = "GET GIFT CARD";
btnWatchad.SetClick(() => { });
btnWatchad.SetClick(() =>
{
makeupTaskData.needShowAni = false;
@@ -314,7 +317,6 @@ namespace ChillConnect
ui.btn_watch.show_cd.selectedIndex = 0;
}
}
private void upLvWatchAdsBtn()
{
var lastAdTimes = SaveData.GetSaveObject()._watch_ad_cd;
@@ -323,7 +325,6 @@ namespace ChillConnect
if (SaveData.GetSaveObject().saveingpot_ch >= makeupTaskData.amount)
{
HallManager.Instance.UpdateSecondEvent -= upLvWatchAdsBtn;
InitView();
return;
}
@@ -336,7 +337,6 @@ namespace ChillConnect
}
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;
@@ -540,7 +540,7 @@ namespace ChillConnect
}
}
ui.lab_mn.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn.text = GameHelper.Get102Str(vo.item_need - value);
ui.list_kicket.itemRenderer = refreshItem;
ui.list_kicket.numItems = makeupTaskData.rdData.Count;
@@ -595,7 +595,7 @@ namespace ChillConnect
}
var vo = ConfigSystem.GetConfig<MakeupModel_2>().GetData(makeupTaskData.tableId);
ui.lab_mn2.text = GameHelper.Get101Str(vo.item_need - value);
ui.lab_mn2.text = GameHelper.Get102Str(vo.item_need - value);
ui.lab_ticket.text = GameHelper.GetPriceInt(makeupTaskData.lastRdData.coupon_mount);
ui.lab_code.text = makeupTaskData.lastRdData.code;
@@ -615,14 +615,14 @@ namespace ChillConnect
{
// GameHelper.OpenEmail();
SDKOpenConfig openConfig = new SDKOpenConfig
{
normal = false,
url = vo.C_ShopURL
};
CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
// SDKOpenConfig openConfig = new SDKOpenConfig
// {
// normal = false,
// url = vo.C_ShopURL
// };
//
//
// CtrlDispatcher.Instance.Dispatch(CtrlMsg.open_wb,openConfig);
CtrlCloseUI();
});
@@ -921,7 +921,6 @@ namespace ChillConnect
for (int i = 0; i < btn_list.Count; i++)
{
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)
{
-1
View File
@@ -300,7 +300,6 @@ namespace ChillConnect
public string PettyDateTime;
public int PettyDataLimit;
public bool IsGetPettyReward = false;
}
public class RankData
{
@@ -71,6 +71,7 @@ namespace ChillConnect
new ExchangeDesModel("ExchangeDescriptors"),
new AppOpenAdModel("SplashAD"),
new ArrowGameConfigModel("ArrowGameConfig"),
new ExchangeRateModel("ExchangeRate"),
},
state =>
{
+145
View File
@@ -0,0 +1,145 @@
using System.Collections.Generic;
using System.IO;
using Newtonsoft.Json;
using ChillConnect;
using UnityEngine;
using System.Globalization;
public static class Language
{
private static Dictionary<string, Dictionary<string, string>> _localizedText;
private static string _currentLanguage;
public static void Initialize()
{
var systemLanguage = Application.systemLanguage;
Debug.Log($"languageInitialize systemLanguage = {systemLanguage}");
var lang = "en";
// if (DataMgr.selectLanguage.Value != -1)
// {
// lang = getISOCode((SystemLanguage)DataMgr.selectLanguage.Value);
// }
// else
// {
if (systemLanguage == SystemLanguage.English)
{
lang = "en";
}
else if (systemLanguage == SystemLanguage.French)
{
lang = "fr";
}
else if (systemLanguage == SystemLanguage.German)
{
lang = "de";
}
else if (systemLanguage == SystemLanguage.Spanish)
{
lang = "es";
}
else if (systemLanguage == SystemLanguage.Portuguese)
{
lang = "pt";
}
else if (systemLanguage == SystemLanguage.Japanese)
{
lang = "ja";
}
else if (systemLanguage == SystemLanguage.Korean)
{
lang = "ko";
}
else if (systemLanguage == SystemLanguage.Russian)
{
lang = "ru";
}
// }
lang = "ja";
setCurrentLanguage(lang);
}
public static void setCurrentLanguage(string lang)
{
_currentLanguage = lang;
PlayerPrefsKit.WriteString("LangIdKey", lang);
}
public static string getCurrentLanguage()
{
return _currentLanguage;
}
public static void LoadLocalizedText()
{
if (_localizedText == null)
{
_localizedText = new Dictionary<string, Dictionary<string, string>>();
}
var localization = LoadKit.Instance.LoadAsset<TextAsset>("TextAsset", "localization");
string json = localization.text;
_localizedText = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(json);
}
public static string GetContent(string key)
{
if (_localizedText == null || !_localizedText.ContainsKey(_currentLanguage) || !_localizedText[_currentLanguage].ContainsKey(key))
{
return key; // 如果找不到对应的键,返回键本身
}
return _localizedText[_currentLanguage][key];
}
public static string GetContentParams(string key, params object[] args)
{
if (_localizedText == null || !_localizedText.ContainsKey(_currentLanguage) || !_localizedText[_currentLanguage].ContainsKey(key))
{
return key; // 如果找不到对应的键,返回键本身
}
string localizedString = _localizedText[_currentLanguage][key];
return string.Format(localizedString, args);
}
public static string getISOCode(SystemLanguage code)
{
if (code == SystemLanguage.English)
{
return "en";
}
else if (code == SystemLanguage.French)
{
return "fr";
}
else if (code == SystemLanguage.German)
{
return "de";
}
else if (code == SystemLanguage.Spanish)
{
return "es";
}
else if (code == SystemLanguage.Portuguese)
{
return "pt";
}
else if (code == SystemLanguage.Japanese)
{
return "ja";
}
else if (code == SystemLanguage.Korean)
{
return "ko";
}
else if (code == SystemLanguage.Russian)
{
return "ru";
}
return "en";
}
}
@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: 2efe38f44f1a4db5a678ff2def90e205
timeCreated: 1783394342
+74 -72
View File
@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using DFFFQTVUv39wKIBSDK;
// using AppsFlyerSDK;
using DG.Tweening;
using IgnoreOPS;
@@ -34,52 +35,53 @@ namespace ChillConnect
public static void Init()
{
#if !UNITY_EDITOR
// // 注册 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);
// 注册 ab事件,0或1,0为自然量版本,1为激励版本
DFFFQTVUv39wKIBSDK_Client.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初始化方法
DFFFQTVUv39wKIBSDK_Client.Instance.Init(null, null, GameConfig);
#endif
}
// public static bool CheckInterstitialReady()
// {
// return NCWWA6A0SDK_Manager.Instance.IsInterReady();
// }
public static bool CheckInterstitialReady()
{
return DFFFQTVUv39wKIBSDK_Client.Instance.IsInterReady();
}
#region 广
public static UnityAction<bool> onInterstitialAdCompleted;
public static void ShowInterstitial(string placement = "DefaultInterstitial",
UnityAction<bool> onCompleted = null)
{
// if (CheckInterstitialReady())
// {
// Debug.Log($"广告已经准备好,播放");
// NCWWA6A0SDK_Manager.Instance.ShowInter(placement, () =>
// {
// DOVirtual.DelayedCall(0.1f, () =>
// {
// onCompleted?.Invoke(true);
// });
// });
// }
// else
// {
// Debug.Log($"广告未准备好,不播放");
// onCompleted?.Invoke(false);
// }
if (CheckInterstitialReady())
{
Debug.Log($"广告已经准备好,播放");
DFFFQTVUv39wKIBSDK_Client.Instance.ShowInter(placement, () =>
{
DOVirtual.DelayedCall(0.1f, () =>
{
onCompleted?.Invoke(true);
});
});
}
else
{
Debug.Log($"广告未准备好,不播放");
onCompleted?.Invoke(false);
}
}
static int retryAttemptInterstitial;
@@ -90,7 +92,7 @@ namespace ChillConnect
private static void LoadAppOpenAd()
{
Debug.Log("LOAD APP. AD");
MaxSdk.LoadAppOpenAd(AppOpenAdUnitId);
// MaxSdk.LoadAppOpenAd(AppOpenAdUnitId);
}
@@ -114,57 +116,57 @@ namespace ChillConnect
// }
// #endif
}
public static void ShowOpenAd(string adUnitId, MaxSdkBase.AdInfo adInfo)
{
MaxSdk.ShowAppOpenAd(AppOpenAdUnitId);
}
// public static void ShowOpenAd(string adUnitId, MaxSdkBase.AdInfo adInfo)
// {
// MaxSdk.ShowAppOpenAd(AppOpenAdUnitId);
// }
#region 广
public static UnityAction<bool> onVideoAdCompleted;
private static string _placement = "";
// public static bool CheckRewardedReady()
// {
// return NCWWA6A0SDK_Manager.Instance.IsVideoReady();
// }
public static bool CheckRewardedReady()
{
return DFFFQTVUv39wKIBSDK_Client.Instance.IsVideoReady();
}
public static void ShowVideo(string placement = "DefaultVideo", UnityAction<bool> onCompleted = null)
{
onVideoAdCompleted = onCompleted;
_placement = placement;
#if UNITY_EDITOR || !GAME_RELEASE
#if UNITY_EDITOR
onVideoAdCompleted?.Invoke(true);
#else
TrackKit.SendEvent(Property.adEvent,Property.watch_ad_people);
TrackKit.SendEvent(Property.adEvent,Property.Rewarded_videos_trigger_number);
// if (CheckRewardedReady())
// {
// NCWWA6A0SDK_Manager.Instance.ShowRewardVideo(_placement, b =>
// {
// DOVirtual.DelayedCall(0.1f, () =>
// {
// onVideoAdCompleted?.Invoke(b);
// });
// }, ()=>
// {
// DOVirtual.DelayedCall(0.25f, () =>
// {
// Debug.Log($"激励广告关闭");
// if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
// {
// TrackKit.SendEvent(Property.adEvent, Property.AfterRewardAdShow);
//
// GameHelper.ShowInterstitial("AfterReward");
// }
// });
// });
// }
// else
// {
// Debug.Log($"广告未准备好,不播放");
// onVideoAdCompleted?.Invoke(false);
// }
if (CheckRewardedReady())
{
DFFFQTVUv39wKIBSDK_Client.Instance.ShowRewardVideo(_placement, b =>
{
DOVirtual.DelayedCall(0.1f, () =>
{
onVideoAdCompleted?.Invoke(b);
});
}, ()=>
{
DOVirtual.DelayedCall(0.25f, () =>
{
Debug.Log($"激励广告关闭");
if (GameHelper.IsGiftSwitch() && !SaveData.GetSaveObject().is_get_removead && (UnityEngine.Random.Range(0, 100) < GameHelper.GetCommonModel().rewardinsertion))
{
TrackKit.SendEvent(Property.adEvent, Property.AfterRewardAdShow);
GameHelper.ShowInterstitial("AfterReward");
}
});
});
}
else
{
Debug.Log($"广告未准备好,不播放");
onVideoAdCompleted?.Invoke(false);
}
#endif
}