Exemplo n.º 1
0
    public override void OnHide()
    {
        State.GetAction(UIAction.StarArea_Leap).Callback         -= OnLeap;
        State.GetAction(UIAction.StarArea_TrackMission).Callback -= OnTrackMission;
        State.GetAction(UIAction.StarArea_TipsToggle).Callback   -= OnToggleTips;
        State.GetAction(UIAction.StarArea_ToPlant).Callback      -= OnEsc;
        State.GetAction(UIAction.StarArea_Legend).Callback       -= OnTab;
        OwnerView.DeleteHotKey(HotKeyID.StarmapOpen);

        m_Scroller.onValueChanged.RemoveAllListeners();
        InputManager.Instance.OnInputDeviceChanged -= OnInputDeviceChanged;
        m_Starmap3DViewer.SetModel(null);
        m_StarAreaPanelLeftTips.OnHide();
        GameObject.Destroy(m_StarAreaPanelLeftTips);
        m_CurrentCell = null;
        foreach (KeyValuePair <ulong, StarAreaElement> item in m_PointDic)
        {
            UIEventListener.UIEventListener.AttachListener(item.Value.gameObject).onEnter = null;
            item.Value.Destroy();
            item.Value.Recycle();
            item.Value.gameObject.Recycle();
        }
        m_PointDic.Clear();
        while (m_Lines.Count > 0)
        {
            m_Lines[0].gameObject.Recycle();
            m_Lines.RemoveAt(0);
        }
        m_Lines.Clear();
        base.OnHide();
    }
Exemplo n.º 2
0
    public void OnRefresh()
    {
        if (m_Data != null)
        {
            m_StarImage.SetModel(m_Data.fixedStarRes, Vector3.zero, Vector3.zero, Vector3.one);
            m_MissionTrackings = m_TaskTrackingProxy.GetAllTrackings();
            m_TeamMembers      = m_TeamProxy.GetMembersList();

            if (m_BeforeID == 0)
            {
                m_BeforeID = m_CfgEternityProxy.GetCurrentGamingMapId();
            }
            DrawMap(m_CfgEternityProxy.GetCurrentGamingMapId(), m_BeforeID);

            if (m_CurrentPoint)
            {
                OwnerView.FocusTo(m_CurrentPoint.gameObject);
            }
            m_Title.text = TableUtil.GetLanguageString($"starmap_name_{m_Data.fixedStarId}");
        }
    }
Exemplo n.º 3
0
 public override void Destroy()
 {
     m_3DViewer.SetModel(null);
     Destroy(m_3DViewer);
     base.Destroy();
 }
Exemplo n.º 4
0
 /// <summary>
 /// 设置星系模型
 /// </summary>
 /// <param name="path"></param>
 private void SetModel(string path)
 {
     m_3DViewer = GetRawImage().GetOrAddComponent <Starmap3DViewer>();
     SetToRaw(new Vector2(25, 25));
     m_3DViewer.SetModel(path, Vector3.zero, Vector3.zero, Vector3.one);
 }
Exemplo n.º 5
0
 /// <summary>
 /// 设置行星模型数据
 /// </summary>
 /// <param name="path"></param>
 private void SetModel(string path)
 {
     m_3DViewer = GetRawImage().GetOrAddComponent <Starmap3DViewer>();
     SetToRaw(m_Data.scale.ToVector2());
     m_3DViewer.SetModel(path, Vector3.zero, Vector3.zero, Vector3.one);
 }