fix:1、sdk更换。2、修复bug
This commit is contained in:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -64,7 +64,7 @@ namespace ChillConnect
|
||||
}
|
||||
void OnH5ClickBtn(object arg)
|
||||
{
|
||||
ui?.ClickBtn((string)arg);
|
||||
// ui?.ClickBtn((string)arg);
|
||||
}
|
||||
protected override void AddServerListener()
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
@@ -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();
|
||||
});
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user