using vnxbqy.UI;
|
using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using UnityEngine;
|
|
|
class SpiritEquipWin : ILOneLevelWindow
|
{
|
private FunctionButton button1;
|
private FunctionButton button2;
|
protected override void BindController()
|
{
|
base.BindController();
|
}
|
|
protected override void AddListeners()
|
{
|
base.AddListeners();
|
SetFunctionListener(0, OnClikcBagTitle);
|
SetFunctionListener(1, OnClickBreachTitle);
|
}
|
protected override void OnPreOpen()
|
{
|
SpiritEquipModel.Instance.UpdateShowWindow += ShowWindow;
|
}
|
|
|
protected override void OnPreClose()
|
{
|
SpiritEquipModel.Instance.UpdateShowWindow += ShowWindow;
|
}
|
protected override void OnAfterOpen()
|
{
|
base.OnAfterOpen();
|
GameObject obj = GameObject.Find("SpiritEquipWin");
|
button1 = obj.transform.Find("Pivot/Container_Functions/Content/Function_0").GetComponent<FunctionButton>();
|
button2 = obj.transform.Find("Pivot/Container_Functions/Content/Function_1").GetComponent<FunctionButton>();
|
}
|
void ShowWindow(int _WindowID)
|
{
|
if (_WindowID == 1)
|
{
|
button1.onClick.Invoke();
|
button1.state = TitleBtnState.Click;
|
button2.state = TitleBtnState.Normal;
|
}
|
|
if (_WindowID == 2)
|
{
|
button2.onClick.Invoke();
|
button2.state = TitleBtnState.Click;
|
button1.state = TitleBtnState.Normal;
|
}
|
|
}
|
void OnClikcBagTitle()
|
{
|
CloseAllChildWindow();
|
WindowCenter.Instance.OpenIL<SpiritEquipBagWin>();
|
}
|
|
void OnClickBreachTitle()
|
{
|
CloseAllChildWindow();
|
WindowCenter.Instance.OpenIL<SpiritEquipBreachWin>();
|
}
|
}
|