|
@@ -53,9 +53,9 @@ namespace GFGGame
|
|
base.Dispose();
|
|
base.Dispose();
|
|
}
|
|
}
|
|
|
|
|
|
- protected override void Init()
|
|
|
|
|
|
+ protected override void OnInit()
|
|
{
|
|
{
|
|
- base.Init();
|
|
|
|
|
|
+ base.OnInit();
|
|
packageName = UI_DressUpFightUI.PACKAGE_NAME;
|
|
packageName = UI_DressUpFightUI.PACKAGE_NAME;
|
|
_ui = UI_DressUpFightUI.Create();
|
|
_ui = UI_DressUpFightUI.Create();
|
|
viewCom = _ui.target;
|
|
viewCom = _ui.target;
|
|
@@ -64,12 +64,6 @@ namespace GFGGame
|
|
_ui.m_btnClose.width = GRoot.inst.width;
|
|
_ui.m_btnClose.width = GRoot.inst.width;
|
|
_ui.m_btnClose.height = GRoot.inst.height;
|
|
_ui.m_btnClose.height = GRoot.inst.height;
|
|
_ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
|
|
_ui.m_btnClose.AddRelation(GRoot.inst, RelationType.Size);
|
|
-
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- protected override void OnInit()
|
|
|
|
- {
|
|
|
|
- base.OnInit();
|
|
|
|
_ui.m_btnLastStep.visible = true;
|
|
_ui.m_btnLastStep.visible = true;
|
|
_ui.m_btnNextStep.visible = true;
|
|
_ui.m_btnNextStep.visible = true;
|
|
_ui.m_btnClose.visible = false;
|
|
_ui.m_btnClose.visible = false;
|
|
@@ -119,6 +113,7 @@ namespace GFGGame
|
|
_ui.m_partsList.m_imgTop.visible = false;
|
|
_ui.m_partsList.m_imgTop.visible = false;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
protected override void AddEventListener()
|
|
protected override void AddEventListener()
|
|
{
|
|
{
|
|
base.AddEventListener();
|
|
base.AddEventListener();
|
|
@@ -130,6 +125,19 @@ namespace GFGGame
|
|
// EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
// EventAgent.AddEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ protected override void RemoveEventListener()
|
|
|
|
+ {
|
|
|
|
+ base.RemoveEventListener();
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
|
|
|
|
+
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
|
+ EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
|
|
+ // EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
protected override void OnShown()
|
|
protected override void OnShown()
|
|
{
|
|
{
|
|
base.OnShown();
|
|
base.OnShown();
|
|
@@ -231,28 +239,20 @@ namespace GFGGame
|
|
MyDressUpHelper.ResetMemory();
|
|
MyDressUpHelper.ResetMemory();
|
|
Timers.inst.Remove(CheckGuide);
|
|
Timers.inst.Remove(CheckGuide);
|
|
}
|
|
}
|
|
- protected override void RemoveEventListener()
|
|
|
|
- {
|
|
|
|
- base.RemoveEventListener();
|
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.CARD_CHOOSE, StartCalculateScore);
|
|
|
|
|
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.DRESS_SEARCH, UpdateSerch);
|
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER, UpdateSerch);
|
|
|
|
- EventAgent.RemoveEventListener(ConstMessage.DRESS_FILTER_RESET, DressResetSerch);
|
|
|
|
- // EventAgent.RemoveEventListener(ConstMessage.DRESS_UP_SCORE_CHANGED, UpdateScore);
|
|
|
|
-
|
|
|
|
- }
|
|
|
|
private void OnClickBtnLastStep()
|
|
private void OnClickBtnLastStep()
|
|
{
|
|
{
|
|
if (!MyDressUpHelper.OnClickBtnLastStep()) return;
|
|
if (!MyDressUpHelper.OnClickBtnLastStep()) return;
|
|
UpdateStepBtn(false);
|
|
UpdateStepBtn(false);
|
|
}
|
|
}
|
|
|
|
+
|
|
private void OnClickBtnNextStep()
|
|
private void OnClickBtnNextStep()
|
|
{
|
|
{
|
|
if (!MyDressUpHelper.OnClickBtnNextStep()) return;
|
|
if (!MyDressUpHelper.OnClickBtnNextStep()) return;
|
|
UpdateStepBtn(false);
|
|
UpdateStepBtn(false);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
private void OnClickBtnBack()
|
|
private void OnClickBtnBack()
|
|
{
|
|
{
|
|
AlertUI.Show("是否确定退出?")
|
|
AlertUI.Show("是否确定退出?")
|
|
@@ -341,6 +341,7 @@ namespace GFGGame
|
|
}
|
|
}
|
|
this.hideListType2();
|
|
this.hideListType2();
|
|
}
|
|
}
|
|
|
|
+
|
|
private void OnClickSearchPartsListItem(EventContext context)
|
|
private void OnClickSearchPartsListItem(EventContext context)
|
|
{
|
|
{
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
@@ -367,6 +368,7 @@ namespace GFGGame
|
|
|
|
|
|
UpdateScore();
|
|
UpdateScore();
|
|
}
|
|
}
|
|
|
|
+
|
|
private void OnClickPartsListItem(EventContext context)
|
|
private void OnClickPartsListItem(EventContext context)
|
|
{
|
|
{
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
@@ -403,6 +405,7 @@ namespace GFGGame
|
|
// UpdateListSuitPartsSelected();
|
|
// UpdateListSuitPartsSelected();
|
|
UpdateScore();
|
|
UpdateScore();
|
|
}
|
|
}
|
|
|
|
+
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
private void OnClickSuitPartsListItem(EventContext context)
|
|
{
|
|
{
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
if (ViewManager.isViewOpen(typeof(DressUpItemTipsView).FullName))
|
|
@@ -433,6 +436,7 @@ namespace GFGGame
|
|
// UpdateListSuitPartsSelected();
|
|
// UpdateListSuitPartsSelected();
|
|
UpdateScore();
|
|
UpdateScore();
|
|
}
|
|
}
|
|
|
|
+
|
|
private void UpdateStepBtn(bool isAdd, int suitId = 0)
|
|
private void UpdateStepBtn(bool isAdd, int suitId = 0)
|
|
{
|
|
{
|
|
if (isAdd)
|
|
if (isAdd)
|