using System;
|
using UnityEngine;
|
using UnityEngine.UI;
|
namespace Snxxz.UI
|
{
|
public class SkillWin : OneLevelWin
|
{
|
[SerializeField] float m_OnDragDelay = 0.1f;
|
|
SkillModel m_Model;
|
SkillModel model {
|
get {
|
return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<SkillModel>());
|
}
|
}
|
|
protected override void BindController()
|
{
|
base.BindController();
|
model.onDragDelay = m_OnDragDelay;
|
}
|
|
protected override void AddListeners()
|
{
|
base.AddListeners();
|
SetFunctionListener(1, OnAccordFunc);
|
SetFunctionListener(0, OnTreasureSkillFunc);
|
SetFunctionListener(2, OnPassFunc);
|
SetFunctionListener(3, OnTalentFunc);
|
}
|
|
private void OnPassFunc()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<SkillPassWin>();
|
functionOrder = 2;
|
}
|
|
private void OnTalentFunc()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<TalentWin>();
|
functionOrder = 3;
|
}
|
|
private void OnAccordFunc()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<SkillAccordWin>();
|
functionOrder = 1;
|
}
|
|
private void OnTreasureSkillFunc()
|
{
|
CloseSubWindows();
|
WindowCenter.Instance.Open<TreasureSkillWin>();
|
functionOrder = 0;
|
}
|
|
protected override void OnActived()
|
{
|
base.OnActived();
|
}
|
|
protected override void OnAfterClose()
|
{
|
if (!WindowJumpMgr.Instance.IsJumpState)
|
{
|
WindowCenter.Instance.Open<MainInterfaceWin>();
|
}
|
}
|
}
|
}
|
|