using System.Collections; using System.Collections.Generic; using UnityEngine; using AX.MessageSystem; /// /// 存放管线数据类 /// public class LineParentData : MonoBehaviour { private GameObject BeginGame; private GameObject EndGame; //线的长度 private float lineLenght; public float LineLenght { get { return lineLenght; } set { lineLenght = value; } } //设置连接头尾物体 public void SetLinkGame(GameObject BeginGame, GameObject EndGame) { this.BeginGame = BeginGame; this.EndGame = EndGame; } //获取头物体 public GameObject GetBeginGame() { return BeginGame; } //获取尾物体 public GameObject GetEndGame() { return EndGame; } private void OnDestroy() { //发送消息 LineLenghtPanel.GetInstance.gameObject.SetActive(false); } }