|
@@ -15,6 +15,7 @@ namespace GFGGame
|
|
private int[] _listBannerDatas = new int[3] { ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING };
|
|
private int[] _listBannerDatas = new int[3] { ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING, ConstBannerId.ZHAI_XING };
|
|
private int[] _listGuideDatas = new int[5] { ConstFieldGuideId.SUIT_GUIDE, ConstFieldGuideId.CHAPTER_ITEM, ConstFieldGuideId.DRESS_UP_GUIDE, ConstFieldGuideId.CARD_GUIDE, ConstFieldGuideId.TRAVEL_GUIDE };
|
|
private int[] _listGuideDatas = new int[5] { ConstFieldGuideId.SUIT_GUIDE, ConstFieldGuideId.CHAPTER_ITEM, ConstFieldGuideId.DRESS_UP_GUIDE, ConstFieldGuideId.CARD_GUIDE, ConstFieldGuideId.TRAVEL_GUIDE };
|
|
GetRedCall[] actions = new GetRedCall[] { RedDotDataManager.Instance.GetFieldGuideRed, null, null, null, RedDotDataManager.Instance.GetTravelGuideRed };
|
|
GetRedCall[] actions = new GetRedCall[] { RedDotDataManager.Instance.GetFieldGuideRed, null, null, null, RedDotDataManager.Instance.GetTravelGuideRed };
|
|
|
|
+ private bool _startInAnim;
|
|
|
|
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
@@ -34,6 +35,7 @@ namespace GFGGame
|
|
this.viewCom = _ui.target;
|
|
this.viewCom = _ui.target;
|
|
isfullScreen = true;
|
|
isfullScreen = true;
|
|
|
|
|
|
|
|
+ _startInAnim = true;
|
|
_ui.m_listGuide.itemRenderer = ListGuideItemRenderer;
|
|
_ui.m_listGuide.itemRenderer = ListGuideItemRenderer;
|
|
|
|
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
_ui.m_btnBack.onClick.Add(OnClickBtnBack);
|
|
@@ -52,7 +54,11 @@ namespace GFGGame
|
|
base.OnShown();
|
|
base.OnShown();
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tjbg");
|
|
_ui.m_loaBg.url = ResPathUtil.GetBgImgPath("tjbg");
|
|
_ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
_ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
- _ui.m_openViewAction.Play();
|
|
|
|
|
|
+ if (_startInAnim)
|
|
|
|
+ {
|
|
|
|
+ _ui.m_listGuide.scrollPane.ScrollTop();
|
|
|
|
+ _ui.m_In.Play();
|
|
|
|
+ }
|
|
Timers.inst.StartCoroutine(UpdatePrgress());
|
|
Timers.inst.StartCoroutine(UpdatePrgress());
|
|
}
|
|
}
|
|
|
|
|
|
@@ -69,21 +75,13 @@ namespace GFGGame
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
{
|
|
{
|
|
// this.Hide();
|
|
// this.Hide();
|
|
- _ui.m_listGuide.scrollPane.ScrollTop();
|
|
|
|
|
|
+ _startInAnim = true;
|
|
ViewManager.GoBackFrom(ViewName.FIELD_GUIDE_VIEW);
|
|
ViewManager.GoBackFrom(ViewName.FIELD_GUIDE_VIEW);
|
|
}
|
|
}
|
|
private void UpdateList()
|
|
private void UpdateList()
|
|
{
|
|
{
|
|
_ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
_ui.m_listGuide.numItems = _listGuideDatas.Length;
|
|
}
|
|
}
|
|
- private void ListBannerItemRenderer(int index, GObject item)
|
|
|
|
- {
|
|
|
|
- UI_ButtonBannerPage listItem = UI_ButtonBannerPage.Proxy(item);
|
|
|
|
- int id = _listBannerDatas[index];
|
|
|
|
- listItem.target.data = id;
|
|
|
|
- UI_ButtonBannerPage.ProxyEnd();
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
|
|
|
|
private void ListGuideItemRenderer(int index, GObject item)
|
|
private void ListGuideItemRenderer(int index, GObject item)
|
|
{
|
|
{
|
|
@@ -93,7 +91,10 @@ namespace GFGGame
|
|
listItem.target.data = id;
|
|
listItem.target.data = id;
|
|
bool red = actions[index] == null ? false : actions[index]();
|
|
bool red = actions[index] == null ? false : actions[index]();
|
|
RedDotController.Instance.SetComRedDot(listItem.target, red, "", -46, 51);
|
|
RedDotController.Instance.SetComRedDot(listItem.target, red, "", -46, 51);
|
|
- listItem.m_Init.Play();
|
|
|
|
|
|
+ if (_startInAnim)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_Init.Play();
|
|
|
|
+ }
|
|
|
|
|
|
UI_CompGuideItem.ProxyEnd();
|
|
UI_CompGuideItem.ProxyEnd();
|
|
}
|
|
}
|
|
@@ -152,6 +153,8 @@ namespace GFGGame
|
|
private IEnumerator UpdatePrgress()
|
|
private IEnumerator UpdatePrgress()
|
|
{
|
|
{
|
|
int num = _ui.m_listGuide.numChildren;
|
|
int num = _ui.m_listGuide.numChildren;
|
|
|
|
+ bool playAnim = _startInAnim;
|
|
|
|
+ _startInAnim = false;
|
|
for (int i = 0; i < num; i++)
|
|
for (int i = 0; i < num; i++)
|
|
{
|
|
{
|
|
UI_CompGuideItem listItem = UI_CompGuideItem.Proxy(_ui.m_listGuide.GetChildAt(i));
|
|
UI_CompGuideItem listItem = UI_CompGuideItem.Proxy(_ui.m_listGuide.GetChildAt(i));
|
|
@@ -161,9 +164,20 @@ namespace GFGGame
|
|
GetGuideProgress(id, out haveCount, out totalCount);
|
|
GetGuideProgress(id, out haveCount, out totalCount);
|
|
decimal value = ProgressCalculate(haveCount, totalCount);
|
|
decimal value = ProgressCalculate(haveCount, totalCount);
|
|
listItem.m_txtProgress.text = value.ToString();
|
|
listItem.m_txtProgress.text = value.ToString();
|
|
- listItem.m_In.Play();
|
|
|
|
|
|
+ if (playAnim)
|
|
|
|
+ {
|
|
|
|
+ listItem.m_In.Play();
|
|
|
|
+ // µ¹ÊýµÚ¶þ¸ö
|
|
|
|
+ if (i == num - 2)
|
|
|
|
+ {
|
|
|
|
+ yield return new WaitForSeconds(0.02f);
|
|
|
|
+ }
|
|
|
|
+ else if (i < num - 2)
|
|
|
|
+ {
|
|
|
|
+ yield return new WaitForSeconds(0.05f);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
UI_CompGuideItem.ProxyEnd();
|
|
UI_CompGuideItem.ProxyEnd();
|
|
- yield return new WaitForSeconds(0.02f);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|