|
@@ -3,10 +3,7 @@ using UI.Main;
|
|
|
using UnityEngine;
|
|
|
using System.Collections.Generic;
|
|
|
using ET;
|
|
|
-using System;
|
|
|
using System.Linq;
|
|
|
-using Hutool;
|
|
|
-using UI.CommonGame;
|
|
|
using Assets.Game.HotUpdate.Data;
|
|
|
|
|
|
namespace GFGGame
|
|
@@ -138,7 +135,6 @@ namespace GFGGame
|
|
|
_btnHaoYou.onClick.Add(OnClickBtnHaoYou);
|
|
|
_btnGongGao.onClick.Add(OnClickBtnGongGao);
|
|
|
_btnRenWu.onClick.Add(OnClickBtnRenWu);
|
|
|
- _ui.m_btnActivityAfuGift.target.visible = false;
|
|
|
_ui.m_btnActivityAfuGift.target.onClick.Add(OnClickBtnAfuGift);
|
|
|
_btnActivityDay7.onClick.Add(OnClickBtnDay7);
|
|
|
_ui.m_btnFirstRecharge.target.onClick.Add(OnClickBtnFirstRecharge);
|
|
@@ -180,7 +176,10 @@ namespace GFGGame
|
|
|
EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
EventAgent.AddEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
|
|
|
EventAgent.AddEventListener(ConstMessage.RESET_DAILY_DATA, ResetDailyData);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
private void ResetDailyData()
|
|
|
{
|
|
|
//ViewManager.Show<MainUIView>();
|
|
@@ -213,7 +212,6 @@ namespace GFGGame
|
|
|
CheckProbabilityUp();
|
|
|
_valueBarController.OnShown();
|
|
|
|
|
|
-
|
|
|
//long lastTime = GameGlobal.lastLoginTime; // GameGlobal.myNumericComponent.GetAsInt(NumericType.OnlineTimeSecs);
|
|
|
|
|
|
//if (!TimeUtil.CheckIsSameTime(lastTime * 1000, TimeHelper.ClientNow()))
|
|
@@ -271,6 +269,7 @@ namespace GFGGame
|
|
|
EventAgent.RemoveEventListener(ConstMessage.STORY_LEVEL_CHANGE, CheckFunOpen);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
EventAgent.RemoveEventListener(ConstMessage.CHANGE_ROLE_HEAD, UpdateHead);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.AFU_GIFT_CHANGED, ChangeAfuActivityState);
|
|
|
}
|
|
|
|
|
|
private void AddEffect()
|
|
@@ -986,6 +985,8 @@ namespace GFGGame
|
|
|
FunctionOpenDataManager.Instance.CheckIsFunOpenById(typeof(FieldGuideView).Name, false);
|
|
|
|
|
|
_btnActivityDay7.visible = ActivityDay7DataManager.Instance.CheckOpen();
|
|
|
+ ChangeAfuActivityState();
|
|
|
+
|
|
|
_ui.m_list.ResizeToFit();
|
|
|
}
|
|
|
|
|
@@ -1015,8 +1016,14 @@ namespace GFGGame
|
|
|
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnXiuFang.target, RedDotDataManager.Instance.GetClothingFosterRed() || RedDotDataManager.Instance.GetClothingSyntheticRed(), "", -10, 20);
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnCiPai.target, RedDotDataManager.Instance.GetCardRed(), "", -10, 20);
|
|
|
-
|
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnZhaiXing.target, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy) || RedDotDataManager.Instance.GetLuckyBoxFreeTimes());
|
|
|
+
|
|
|
+ // 阿福赠礼
|
|
|
+ if (_ui.m_btnActivityAfuGift.target.visible)
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnActivityAfuGift.target, ActivityAfuGiftDataManager.Instance.HaveCanGetReward(), "", -24, 2);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
private void CheckProbabilityUp()
|
|
@@ -1131,5 +1138,11 @@ namespace GFGGame
|
|
|
_ui.m_grpLeagueTips.SetPosition(pos.x - _ui.m_grpLeagueTips.width + 20, pos.y + 20, 0);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ private void ChangeAfuActivityState()
|
|
|
+ {
|
|
|
+ _ui.m_btnActivityAfuGift.target.visible = ActivityAfuGiftDataManager.Instance.IsOpen;
|
|
|
+ }
|
|
|
}
|
|
|
}
|