//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Saturday, December 16, 2017
|
//--------------------------------------------------------
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class EquipDecomposeBehaviour : MonoBehaviour,IInGamePush
|
{
|
[SerializeField] GameObject m_ItemDecom;
|
[SerializeField] Button m_Close;
|
[SerializeField] Button m_Goto;
|
|
private void OnEnable()
|
{
|
m_Close.AddListener(CloseItemShow);
|
m_Goto.AddListener(GotoDecompose);
|
}
|
|
private void OnDisable()
|
{
|
m_Close.RemoveAllListeners();
|
m_Goto.RemoveAllListeners();
|
}
|
|
private void GotoDecompose()
|
{
|
if (!WindowCenter.Instance.IsOpen<EquipDecomMailWin>())
|
{
|
WindowCenter.Instance.Open<EquipDecomMailWin>();
|
}
|
CloseItemShow();
|
}
|
|
private void CloseItemShow()
|
{
|
ModelCenter.Instance.GetModel<PackModel>().isAutoDecompose = false;
|
m_ItemDecom.SetActive(false);
|
}
|
|
public int GetSiblingIndex()
|
{
|
return transform.GetSiblingIndex();
|
}
|
|
public bool IsActive()
|
{
|
return transform.gameObject.activeSelf;
|
}
|
}
|
|
}
|
|
|
|
|
|