少年修仙传客户端代码仓库
client_Wu Xijin
2018-08-11 cdfc472ad6ab1baa880ff9f6f15c7e0d8493150d
System/WorldMap/MapLineBehaviour.cs
@@ -1,50 +1,50 @@
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, November 07, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class MapLineBehaviour : MonoBehaviour
    {
        [SerializeField] Button m_Select;
        [SerializeField] Text m_Title;
        MapModel m_Model;
        MapModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<MapModel>()); } }
        int lineId = 0;
        Transform m_ContainerLines;
        public void Display(int _lineId, Transform _parent)
        {
            lineId = _lineId;
            m_Title.text = Language.Get("line", _lineId + 1);
            m_ContainerLines = _parent;
        }
        private void Awake()
        {
            m_Select.AddListener(SelectLine);
        }
        private void SelectLine()
        {
            m_ContainerLines.gameObject.SetActive(false);
            model.RequestSelectedLine(lineId);
            WindowCenter.Instance.Close<WorldMapWin>();
            WindowCenter.Instance.Close<LocalMapWin>();
            WindowCenter.Instance.Open<MainInterfaceWin>();
        }
    }
}
//--------------------------------------------------------
//    [Author]:           第二世界
//    [  Date ]:           Tuesday, November 07, 2017
//--------------------------------------------------------
using UnityEngine;
using System.Collections;
using UnityEngine.UI;
namespace Snxxz.UI
{
    public class MapLineBehaviour : MonoBehaviour
    {
        [SerializeField] Button m_Select;
        [SerializeField] Text m_Title;
        MapModel m_Model;
        MapModel model { get { return m_Model ?? (m_Model = ModelCenter.Instance.GetModel<MapModel>()); } }
        int lineId = 0;
        Transform m_ContainerLines;
        public void Display(int _lineId, Transform _parent)
        {
            lineId = _lineId;
            m_Title.text = Language.Get("line", _lineId + 1);
            m_ContainerLines = _parent;
        }
        private void Awake()
        {
            m_Select.AddListener(SelectLine);
        }
        private void SelectLine()
        {
            m_ContainerLines.gameObject.SetActive(false);
            model.RequestSelectedLine(lineId);
            WindowCenter.Instance.Close<WorldMapWin>();
            WindowCenter.Instance.Close<LocalMapWin>();
            WindowCenter.Instance.Open<MainInterfaceWin>();
        }
    }
}