using System;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
public class HappyXBWin : OneLevelWin
|
{
|
HappyXBModel model { get { return ModelCenter.Instance.GetModel<HappyXBModel>(); } }
|
|
protected override void AddListeners()
|
{
|
base.AddListeners();
|
SetFunctionListener(0, ClickBestXB);
|
SetFunctionListener(1, ClickRuneXB);
|
SetFunctionListener(2, ClickXBStore);
|
SetFunctionListener(3, ClickXBWarehouse);
|
}
|
|
private void ClickXBWarehouse()
|
{
|
if (model.xbWarehouseRed.state == RedPointState.Simple)
|
{
|
model.xbWarehouseRed.state = RedPointState.None;
|
}
|
|
CloseSubWindows();
|
WindowCenter.Instance.Open<XBWarehouseWin>();
|
functionOrder = 3;
|
}
|
|
private void ClickXBStore()
|
{
|
if (model.xbStoreRed.state == RedPointState.Simple)
|
{
|
model.xbStoreRed.state = RedPointState.None;
|
}
|
|
CloseSubWindows();
|
WindowCenter.Instance.Open<XBStoreWin>();
|
functionOrder = 2;
|
}
|
|
private void ClickRuneXB()
|
{
|
model.title = HappXBTitle.Rune;
|
CloseSubWindows();
|
WindowCenter.Instance.Open<RuneXBWin>();
|
functionOrder = 1;
|
}
|
|
private void ClickBestXB()
|
{
|
model.title = HappXBTitle.Best;
|
CloseSubWindows();
|
WindowCenter.Instance.Open<BestXBWin>();
|
functionOrder = 0;
|
}
|
}
|
}
|