|
@@ -9,13 +9,16 @@ namespace GFGGame
|
|
{
|
|
{
|
|
private UI_SuitUI _ui;
|
|
private UI_SuitUI _ui;
|
|
|
|
|
|
- private int _suitId;
|
|
|
|
private GameObject _scenePrefab;
|
|
private GameObject _scenePrefab;
|
|
private GameObject _sceneObject;
|
|
private GameObject _sceneObject;
|
|
private GoWrapper _wrapper;
|
|
private GoWrapper _wrapper;
|
|
private DressUpObjDataCache _dressUpObjDataCache;
|
|
private DressUpObjDataCache _dressUpObjDataCache;
|
|
private bool _actionIsPic;
|
|
private bool _actionIsPic;
|
|
private List<int> _suitIds;
|
|
private List<int> _suitIds;
|
|
|
|
+
|
|
|
|
+ private int _suitId;
|
|
|
|
+ private int _index;
|
|
|
|
+
|
|
public override void Dispose()
|
|
public override void Dispose()
|
|
{
|
|
{
|
|
|
|
|
|
@@ -41,6 +44,7 @@ namespace GFGGame
|
|
_ui.m_btnLeft.onClick.Add(() => { OnClickBtnDirection(-1); });
|
|
_ui.m_btnLeft.onClick.Add(() => { OnClickBtnDirection(-1); });
|
|
_ui.m_btnRight.onClick.Add(() => { OnClickBtnDirection(1); });
|
|
_ui.m_btnRight.onClick.Add(() => { OnClickBtnDirection(1); });
|
|
_ui.m_btnReward.target.onClick.Add(OnClickBtnReward);
|
|
_ui.m_btnReward.target.onClick.Add(OnClickBtnReward);
|
|
|
|
+ _ui.m_btnPropertyShow.onClick.Add(OnClickBtnPropertyShow);
|
|
|
|
|
|
_ui.m_listFoster.itemRenderer = ListFosterItemRender;
|
|
_ui.m_listFoster.itemRenderer = ListFosterItemRender;
|
|
_ui.m_listFoster.onClickItem.Add(OnClickListFosterItem);
|
|
_ui.m_listFoster.onClickItem.Add(OnClickListFosterItem);
|
|
@@ -133,14 +137,26 @@ namespace GFGGame
|
|
{
|
|
{
|
|
UI_ListFosterItem item = UI_ListFosterItem.Proxy(obj);
|
|
UI_ListFosterItem item = UI_ListFosterItem.Proxy(obj);
|
|
item.target.data = index;
|
|
item.target.data = index;
|
|
|
|
+ if (index == 0)
|
|
|
|
+ {
|
|
|
|
+ _index = index;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
private void OnClickListFosterItem(EventContext context)
|
|
private void OnClickListFosterItem(EventContext context)
|
|
{
|
|
{
|
|
- ViewManager.Show<SuitFosterView>(new object[] { _suitId, (int)((context.data as GObject).data) });
|
|
|
|
|
|
+ int index = (int)(context.data as GObject).data;
|
|
|
|
+ if (index == _index)
|
|
|
|
+ {
|
|
|
|
+ ViewManager.Show<SuitFosterView>(new object[] { _suitId, index });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
private void OnClickBtnReward()
|
|
private void OnClickBtnReward()
|
|
{
|
|
{
|
|
ViewManager.Show<SuitRewardView>(_suitId);
|
|
ViewManager.Show<SuitRewardView>(_suitId);
|
|
}
|
|
}
|
|
|
|
+ private void OnClickBtnPropertyShow()
|
|
|
|
+ {
|
|
|
|
+ ViewManager.Show<SuitPropertyShowView>(new object[] { _suitId, _index });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|