//--------------------------------------------------------
|
// [Author]: 第二世界
|
// [ Date ]: Sunday, April 29, 2018
|
//--------------------------------------------------------
|
using UnityEngine;
|
using System.Collections;
|
using UnityEngine.UI;
|
|
namespace vnxbqy.UI
|
{
|
|
public class ResourceBackBehaviour : MonoBehaviour, IInGamePush
|
{
|
[SerializeField] GameObject m_ResourceBackBehaviour;
|
[SerializeField] Button m_CloseButton;
|
[SerializeField] Button m_GoButton;
|
ResourcesBackModel resourcesBack { get { return ModelCenter.Instance.GetModel<ResourcesBackModel>(); } }
|
private void OnEnable()
|
{
|
m_CloseButton.AddListener(CloseButton);
|
m_GoButton.AddListener(GoButton);
|
}
|
|
private void OnDisable()
|
{
|
m_CloseButton.RemoveAllListeners();
|
m_GoButton.RemoveAllListeners();
|
}
|
|
private void CloseButton()
|
{
|
m_ResourceBackBehaviour.SetActive(false);
|
resourcesBack.IsMainGo = false;
|
}
|
|
private void GoButton()
|
{
|
WindowJumpMgr.Instance.WindowJumpTo(JumpUIType.DailyQuestFunc3);
|
resourcesBack.IsMainGo = false;
|
}
|
|
public int GetSiblingIndex()
|
{
|
return transform.GetSiblingIndex();
|
}
|
|
public bool IsActive()
|
{
|
return transform.gameObject.activeSelf
|
&& m_ResourceBackBehaviour.activeSelf;
|
}
|
}
|
|
}
|
|
|
|