|
@@ -20,10 +20,11 @@ namespace GFGGame
|
|
|
_ui.Dispose();
|
|
|
_ui = null;
|
|
|
}
|
|
|
+ UI_ComTipsApproach.ProxyEnd();
|
|
|
}
|
|
|
public void OnHide()
|
|
|
{
|
|
|
- _ui.m_list.onClickItem.Remove(OnClickListApproachItem);
|
|
|
+ // _ui.m_list.onClickItem.Remove(OnClickListApproachItem);
|
|
|
if (_ui.m_list.numItems > 0)
|
|
|
{
|
|
|
_ui.m_list.ScrollToView(0);
|
|
@@ -31,16 +32,20 @@ namespace GFGGame
|
|
|
}
|
|
|
_approachDatas.Clear();
|
|
|
_fromeViewDatas = null;
|
|
|
- UI_ComTipsApproach.ProxyEnd();
|
|
|
}
|
|
|
- public void OnShow(GComponent component, object[] viewData)
|
|
|
+ public void OnInit(GComponent component)
|
|
|
{
|
|
|
_ui = UI_ComTipsApproach.Proxy(component);
|
|
|
+ _ui.m_list.itemRenderer = ListApproachItemRenderer;
|
|
|
+
|
|
|
+ }
|
|
|
+ public void OnShow(object[] viewData)
|
|
|
+ {
|
|
|
+
|
|
|
_viewData = viewData;
|
|
|
_itemId = (int)viewData[0];
|
|
|
_fromeViewDatas = viewData[1] as object[];
|
|
|
_needCount = viewData.Length > 2 ? (int)viewData[2] : 0;
|
|
|
- _ui.m_list.itemRenderer = ListApproachItemRenderer;
|
|
|
// _ui.m_list.onClickItem.Add(OnClickListApproachItem);
|
|
|
|
|
|
SetData();
|
|
@@ -187,34 +192,42 @@ namespace GFGGame
|
|
|
PromptController.Instance.ShowFloatTextPrompt("关卡未开启");
|
|
|
break;
|
|
|
}
|
|
|
- // this.Hide();
|
|
|
if (!TimeUtil.CheckDayOfWeek(studioCfg.timeArr))
|
|
|
{
|
|
|
PromptController.Instance.ShowFloatTextPrompt("不在活动周期内");
|
|
|
break;
|
|
|
}
|
|
|
-
|
|
|
- int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
|
|
|
- StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
|
|
|
- StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
|
|
|
- if (studioCfg.funId == typeof(StudioPropertyView).Name)
|
|
|
+ if (studioCfg.funId == typeof(StudioFilingView).Name)
|
|
|
{
|
|
|
- List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioPropertyView).Name);
|
|
|
- for (int i = 0; i < studioCfgs.Count; i++)
|
|
|
+ StudioDataManager.Instance.filingChapterId = studioCfg.id;
|
|
|
+ ViewManager.Show<StudioFilingView>();
|
|
|
+ MainStoryDataManager.currentLevelCfgId = levelCfg.id;
|
|
|
+ InstanceZonesController.ShowLevelView(levelCfg.id, StudioDataManager.Instance.OnFinishFilingStoryLevel);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ int type = studioCfg.funId == typeof(StudioPropertyView).Name ? 1 : 0;
|
|
|
+ StudioDataManager.Instance.TYPE_SELECT_INDEX = type;
|
|
|
+ StudioDataManager.Instance.PROPERTY_SELECT_INDEX = 0;
|
|
|
+ if (studioCfg.funId == typeof(StudioPropertyView).Name)
|
|
|
{
|
|
|
- if (studioCfgs[i].id == studioCfg.id)
|
|
|
+ List<StudioCfg> studioCfgs = StudioCfgArray.Instance.GetCfgsByfunId(typeof(StudioPropertyView).Name);
|
|
|
+ for (int i = 0; i < studioCfgs.Count; i++)
|
|
|
{
|
|
|
- StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
|
|
|
- break;
|
|
|
+ if (studioCfgs[i].id == studioCfg.id)
|
|
|
+ {
|
|
|
+ StudioDataManager.Instance.PROPERTY_SELECT_INDEX = i;
|
|
|
+ break;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- string viewName = "GFGGame." + studioCfg.funId;
|
|
|
+ string viewName = "GFGGame." + studioCfg.funId;
|
|
|
|
|
|
- ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
|
|
|
- StudioDataManager.Instance.VIEW_NAME = viewName;
|
|
|
- InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStudioStoryLevel, _itemId, _needCount);
|
|
|
- isJump = true;
|
|
|
+ ViewManager.Show(viewName, new object[] { type, 0 }, _fromeViewDatas);
|
|
|
+ StudioDataManager.Instance.VIEW_NAME = viewName;
|
|
|
+ InstanceZonesController.ShowLevelView(levelCfgId, StudioDataManager.Instance.OnFinishStudioStoryLevel, _itemId, _needCount);
|
|
|
+ isJump = true;
|
|
|
+ }
|
|
|
break;
|
|
|
}
|
|
|
else
|