|
@@ -42,6 +42,9 @@ namespace GFGGame
|
|
//用于标记自动检测打开界面流程已执行完毕
|
|
//用于标记自动检测打开界面流程已执行完毕
|
|
private bool AutoShowCompleted;
|
|
private bool AutoShowCompleted;
|
|
|
|
|
|
|
|
+ //用于分帧更新红点
|
|
|
|
+ private int redPointUpdateFrame = -1;
|
|
|
|
+
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
if (_valueBarController != null)
|
|
if (_valueBarController != null)
|
|
@@ -222,7 +225,6 @@ namespace GFGGame
|
|
Timers.inst.Remove(CheckGuide);
|
|
Timers.inst.Remove(CheckGuide);
|
|
Timers.inst.Remove(UpdateAdListTime);
|
|
Timers.inst.Remove(UpdateAdListTime);
|
|
Timers.inst.Remove(OnShowLater);
|
|
Timers.inst.Remove(OnShowLater);
|
|
- Timers.inst.Remove(OnRedDotChangedLater);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void OnShowLater(object param)
|
|
private void OnShowLater(object param)
|
|
@@ -592,6 +594,7 @@ namespace GFGGame
|
|
UpGiftBox1();
|
|
UpGiftBox1();
|
|
UpGiftBox2();
|
|
UpGiftBox2();
|
|
EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_TIME);
|
|
EventAgent.DispatchEvent(ConstMessage.LUCKY_BOX_TIME);
|
|
|
|
+ UpdateRedDot();
|
|
}
|
|
}
|
|
|
|
|
|
private void UpdateActLuckyBox()
|
|
private void UpdateActLuckyBox()
|
|
@@ -844,48 +847,73 @@ namespace GFGGame
|
|
//LogHelper.LogEditor("MainUIView UpdateRedDot OnRedDotChanged");
|
|
//LogHelper.LogEditor("MainUIView UpdateRedDot OnRedDotChanged");
|
|
if (!GameGlobal.AfterDataInited) return;
|
|
if (!GameGlobal.AfterDataInited) return;
|
|
if (!AutoShowCompleted) return;
|
|
if (!AutoShowCompleted) return;
|
|
- Timers.inst.Remove(OnRedDotChangedLater);
|
|
|
|
- Timers.inst.Add(0.1f, 1, OnRedDotChangedLater);
|
|
|
|
|
|
+ redPointUpdateFrame = 0;
|
|
}
|
|
}
|
|
|
|
|
|
- private void OnRedDotChangedLater(object o)
|
|
|
|
- {
|
|
|
|
- UpdateRedDot();
|
|
|
|
- }
|
|
|
|
|
|
|
|
private void UpdateRedDot()
|
|
private void UpdateRedDot()
|
|
{
|
|
{
|
|
|
|
+ if (redPointUpdateFrame < 0) return;
|
|
LogHelper.LogEditor("MainUIView UpdateRedDot");
|
|
LogHelper.LogEditor("MainUIView UpdateRedDot");
|
|
- _valueBarController.UpRead();
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnGongGao, RedDotDataManager.Instance.GetNoticeRed(), "", -9, 12);
|
|
|
|
-
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnRenWu, RedDotDataManager.Instance.GetTaskRed(), "", -8);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnYouJian, RedDotDataManager.Instance.GetMailRed(), "", -9, 12);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnTuJian, RedDotDataManager.Instance.GetFieldGuideRed() || RedDotDataManager.Instance.GetTravelGuideRed(), "", -8);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed(), "", -8);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnStore, RedDotDataManager.Instance.GetShopRed(), "", -8);
|
|
|
|
-
|
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_headBar.m_comHead, RedDotDataManager.Instance.GetHeadRed() || RedDotDataManager.Instance.GetHeadBorderRed(), "", -26, 42);
|
|
|
|
-
|
|
|
|
- RedDotController.Instance.SetComRedDot(_btnLeague, RedDotDataManager.Instance.GetLeagueRed(), "", -8);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetDailyWelfareRed(), "", 9, -1);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed()
|
|
|
|
|
|
+ if (redPointUpdateFrame == 0)
|
|
|
|
+ _valueBarController.UpdateRedPoint();
|
|
|
|
+ if (redPointUpdateFrame == 1)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnGongGao, RedDotDataManager.Instance.GetNoticeRed(), "", -9, 12);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 2)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnRenWu, RedDotDataManager.Instance.GetTaskRed(), "", -8);
|
|
|
|
+ if (redPointUpdateFrame == 3)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnYouJian, RedDotDataManager.Instance.GetMailRed(), "", -9, 12);
|
|
|
|
+ if (redPointUpdateFrame == 4)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnTuJian, RedDotDataManager.Instance.GetFieldGuideRed() || RedDotDataManager.Instance.GetTravelGuideRed(), "", -8);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 5)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnHaoYou, RedDotDataManager.Instance.GetFriendRed(), "", -8);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 6)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnStore, RedDotDataManager.Instance.GetShopRed(), "", -8);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 7)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_headBar.m_comHead, RedDotDataManager.Instance.GetHeadRed() || RedDotDataManager.Instance.GetHeadBorderRed(), "", -26, 42);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 8)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnLeague, RedDotDataManager.Instance.GetLeagueRed(), "", -8);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 9)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnDailyWelfare.target, RedDotDataManager.Instance.GetDailyWelfareRed(), "", 9, -1);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 10)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnActivityLuckyBox.target, RedDotDataManager.Instance.GetMeiRiTeHuiRed()
|
|
|| RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox)
|
|
|| RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitLuckyBox)
|
|
|| RedDotDataManager.Instance.GetActLuckyBoxTaskdRed() || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -11, 5);
|
|
|| RedDotDataManager.Instance.GetActLuckyBoxTaskdRed() || RedDotDataManager.Instance.GetGiftBagRewardRed(), "", -11, 5);
|
|
- RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed(), "", -8);
|
|
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_btnActivityDay7.target, RedDotDataManager.Instance.GetActivityDay7Red());
|
|
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 11)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_btnBag, RedDotDataManager.Instance.GetMainBagGiftRed(), "", -8);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 12)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnActivityDay7.target, RedDotDataManager.Instance.GetActivityDay7Red());
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnWanShiLi.target, RedDotDataManager.Instance.GetActivityWanShiLiRed(), "", -25, -7);
|
|
RedDotController.Instance.SetComRedDot(_ui.m_btnWanShiLi.target, RedDotDataManager.Instance.GetActivityWanShiLiRed(), "", -25, -7);
|
|
|
|
|
|
- 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 (redPointUpdateFrame == 13)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnXiuFang.target, RedDotDataManager.Instance.GetClothingFosterRed() || RedDotDataManager.Instance.GetClothingSyntheticRed(), "", -10, 20);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 14)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnCiPai.target, RedDotDataManager.Instance.GetCardRed(), "", -10, 20);
|
|
|
|
+
|
|
|
|
+ if (redPointUpdateFrame == 15)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnZhaiXing.target, RedDotDataManager.Instance.GetActLuckyBoxRewardRed(ConstLimitTimeActivityType.ActLimitTsy) || RedDotDataManager.Instance.GetLuckyBoxFreeTimes());
|
|
|
|
|
|
// 阿福赠礼
|
|
// 阿福赠礼
|
|
if (_ui.m_btnActivityAfuGift.target.visible)
|
|
if (_ui.m_btnActivityAfuGift.target.visible)
|
|
{
|
|
{
|
|
- RedDotController.Instance.SetComRedDot(_ui.m_btnActivityAfuGift.target, ActivityAfuGiftDataManager.Instance.HaveCanGetReward(), "", -43, 2);
|
|
|
|
|
|
+ if (redPointUpdateFrame == 16)
|
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_btnActivityAfuGift.target, ActivityAfuGiftDataManager.Instance.HaveCanGetReward(), "", -43, 2);
|
|
|
|
+ }
|
|
|
|
+ redPointUpdateFrame++;
|
|
|
|
+ if(redPointUpdateFrame > 16)
|
|
|
|
+ {
|
|
|
|
+ redPointUpdateFrame = -1;
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
private void CheckProbabilityUp()
|
|
private void CheckProbabilityUp()
|
|
@@ -996,7 +1024,7 @@ namespace GFGGame
|
|
private void ResetDailyData()
|
|
private void ResetDailyData()
|
|
{
|
|
{
|
|
CheckFunOpen();
|
|
CheckFunOpen();
|
|
- UpdateRedDot();
|
|
|
|
|
|
+ redPointUpdateFrame = 0;
|
|
UpdateHead();
|
|
UpdateHead();
|
|
UpdateBtnFirstRecharge();
|
|
UpdateBtnFirstRecharge();
|
|
CheckAutoShowViews();
|
|
CheckAutoShowViews();
|