|
@@ -74,6 +74,7 @@ namespace GFGGame
|
|
|
{
|
|
|
base.AddEventListener();
|
|
|
EventAgent.AddEventListener(ConstMessage.NUMERIC_CHANGE, UpdateSupplyView);
|
|
|
+ EventAgent.AddEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
}
|
|
|
|
|
|
protected override void OnShown()
|
|
@@ -83,6 +84,7 @@ namespace GFGGame
|
|
|
_day = TimeUtil.GetCurDay();
|
|
|
UpdateSupplyView();
|
|
|
_ui.m_t0.Play();
|
|
|
+ UpdateRedDot();
|
|
|
}
|
|
|
|
|
|
protected override void OnHide()
|
|
@@ -95,6 +97,7 @@ namespace GFGGame
|
|
|
{
|
|
|
base.RemoveEventListener();
|
|
|
EventAgent.RemoveEventListener(ConstMessage.NUMERIC_CHANGE, UpdateSupplyView);
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.RED_CHANGE, UpdateRedDot);
|
|
|
}
|
|
|
|
|
|
private void OnBtnBackClick()
|
|
@@ -192,5 +195,10 @@ namespace GFGGame
|
|
|
UpdateSupplyView();
|
|
|
}
|
|
|
}
|
|
|
+ private void UpdateRedDot()
|
|
|
+ {
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_comSupply.m_comSupply0.m_btnGet, RedDotDataManager.Instance.DailySupplyRed(DailySupplyCfgArray.Instance.dataArray[0]));
|
|
|
+ RedDotController.Instance.SetComRedDot(_ui.m_comSupply.m_comSupply1.m_btnGet, RedDotDataManager.Instance.DailySupplyRed(DailySupplyCfgArray.Instance.dataArray[1]));
|
|
|
+ }
|
|
|
}
|
|
|
}
|