Merge branch 'master' of http://gitea.umayle.com/gaoguozheng/GQ_Communicate
This commit is contained in:
commit
dfa81147e9
GQ_TongXin/Assets
Adam/Scripts
Prefabs/Prefabs/面板
Resources
Scenes
Scripts/WJ
script
|
@ -20,6 +20,9 @@ public class DeviceManager : MonoBehaviour
|
|||
public UPosManger uposManger;
|
||||
public GameObject stagingPanel;
|
||||
// Use this for initialization
|
||||
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
editorMenu.gameObject.SetActive(false);
|
||||
|
|
|
@ -25,6 +25,7 @@ public class UPosItem : MonoBehaviour
|
|||
{
|
||||
instruct = Instantiate(Resources.Load<SpriteRenderer>("Adam/Instruct"), transform);
|
||||
//DestroyImmediate(transform.GetChild(0).gameObject);
|
||||
instruct.transform.localPosition = new Vector3(0.38f, 0.32f, 0.002f);
|
||||
}
|
||||
|
||||
private void Start()
|
||||
|
|
|
@ -21,6 +21,16 @@ public class UPosManger : MonoBehaviour
|
|||
SetCurrentUPosIsOccupied(0, uPosItems.Length - 1, false);
|
||||
}
|
||||
|
||||
[ContextMenu("SetUPosItem")]
|
||||
public void SetUPosItem()
|
||||
{
|
||||
for (int i = 0; i < transform.childCount; i++)
|
||||
{
|
||||
//DestroyImmediate(transform.GetChild(i).gameObject.GetComponent<UPosItem>());
|
||||
transform.GetChild(i).gameObject.GetComponent<UPosItem>().SetValue();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 监视所有U位
|
||||
/// </summary>
|
||||
|
|
|
@ -1,5 +1,85 @@
|
|||
%YAML 1.1
|
||||
%TAG !u! tag:unity3d.com,2011:
|
||||
--- !u!1 &1789168724
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 1789168725}
|
||||
- component: {fileID: 1789168727}
|
||||
- component: {fileID: 1789168726}
|
||||
m_Layer: 5
|
||||
m_Name: Text (Legacy)
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1789168725
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1789168724}
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 5977727790842883243}
|
||||
m_RootOrder: 0
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
m_AnchoredPosition: {x: -171.2973, y: 210.00952}
|
||||
m_SizeDelta: {x: 104.487, y: 43.981}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!222 &1789168727
|
||||
CanvasRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1789168724}
|
||||
m_CullTransparentMesh: 1
|
||||
--- !u!114 &1789168726
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1789168724}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_Material: {fileID: 0}
|
||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||
m_RaycastTarget: 1
|
||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||
m_Maskable: 1
|
||||
m_OnCullStateChanged:
|
||||
m_PersistentCalls:
|
||||
m_Calls: []
|
||||
m_FontData:
|
||||
m_Font: {fileID: 12800000, guid: f945cd23a57e99b46ac65684d5bb3be8, type: 3}
|
||||
m_FontSize: 17
|
||||
m_FontStyle: 0
|
||||
m_BestFit: 0
|
||||
m_MinSize: 10
|
||||
m_MaxSize: 40
|
||||
m_Alignment: 4
|
||||
m_AlignByGeometry: 0
|
||||
m_RichText: 1
|
||||
m_HorizontalOverflow: 0
|
||||
m_VerticalOverflow: 0
|
||||
m_LineSpacing: 1
|
||||
m_Text: "\u7EBF\u7F06\u7EC4"
|
||||
--- !u!1 &5977727790324167057
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -32,7 +112,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5977727790908149270}
|
||||
m_Father: {fileID: 5977727790842883243}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 3
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -110,7 +190,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5977727791592261006}
|
||||
m_Father: {fileID: 5977727790842883243}
|
||||
m_RootOrder: 3
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -202,7 +282,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &5977727790842883243
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
@ -215,6 +295,7 @@ RectTransform:
|
|||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children:
|
||||
- {fileID: 1789168725}
|
||||
- {fileID: 5977727791705923583}
|
||||
- {fileID: 5977727791436101996}
|
||||
- {fileID: 5977727790324167058}
|
||||
|
@ -458,7 +539,7 @@ RectTransform:
|
|||
m_Children:
|
||||
- {fileID: 5977727791117286455}
|
||||
m_Father: {fileID: 5977727790842883243}
|
||||
m_RootOrder: 1
|
||||
m_RootOrder: 2
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
@ -672,7 +753,7 @@ RectTransform:
|
|||
- {fileID: 5977727791812832095}
|
||||
- {fileID: 5977727791749398742}
|
||||
m_Father: {fileID: 5977727790842883243}
|
||||
m_RootOrder: 0
|
||||
m_RootOrder: 1
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||
|
|
|
@ -116,7 +116,7 @@ Material:
|
|||
m_Colors:
|
||||
- _BaseColor: {r: 0, g: 0.74509805, b: 1, a: 1}
|
||||
- _Color: {r: 0, g: 0.74509805, b: 1, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 4.237095, b: 4.237095, a: 1}
|
||||
- _EmissionColor: {r: 0, g: 0.32599604, b: 0.32082152, a: 1}
|
||||
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
|
||||
m_BuildTextureStacks: []
|
||||
--- !u!114 &4586313418104410923
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -26,6 +26,7 @@ public class LineGroupManager : MonoBehaviour
|
|||
{
|
||||
add_line_group_button.onClick.AddListener(() =>
|
||||
{
|
||||
LineQuery.Inst.StartCoroutine(LineQuery.Inst.getJsonCoroutine());
|
||||
if (!string.IsNullOrWhiteSpace(line_group_name_inputfield.text))
|
||||
{
|
||||
AddLineGroup(line_group_name_inputfield.text);
|
||||
|
|
|
@ -25,6 +25,7 @@ public class UIToCabinet : MonoBehaviour
|
|||
GameManager.Inst.power_close();
|
||||
rongLaing.SetActive(false);
|
||||
FloorController.Inst.FloorNormal();
|
||||
CreateLine createLine = PatternChoose.Inst.transform.Find("ťĎß").GetComponent<CreateLine>();
|
||||
for (int i = 0; i < GameManager.Inst.pop_ups.Count; i++)
|
||||
{
|
||||
GameManager.Inst.pop_ups[i].SetActive(false);
|
||||
|
@ -148,7 +149,7 @@ public class UIToCabinet : MonoBehaviour
|
|||
{
|
||||
init(Menu.M_数字孪生_线缆连接_展示);
|
||||
ExtendedFlycam.Inst.QuanJing();
|
||||
CreateLine createLine = PatternChoose.Inst.transform.Find("ťĎß").GetComponent<CreateLine>();
|
||||
//CreateLine createLine = PatternChoose.Inst.transform.Find("ťĎß").GetComponent<CreateLine>();
|
||||
createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示);
|
||||
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示);
|
||||
}
|
||||
|
@ -202,7 +203,7 @@ public class UIToCabinet : MonoBehaviour
|
|||
{
|
||||
init(Menu.M_数字孪生_线缆连接_展示);
|
||||
ExtendedFlycam.Inst.QuanJing();
|
||||
CreateLine createLine = PatternChoose.Inst.transform.Find("ťĎß").GetComponent<CreateLine>();
|
||||
|
||||
//PatternChoose.Inst.transform.Find("Panel搜索框").GetComponent<SearchName>().LoadCabinet(SearchName.SearchType.线缆_展示);
|
||||
createLine.OnMenuChanged(Menu.M_数字孪生_线缆连接_展示);
|
||||
CabinetUIManager.ChangeMenu(Menu.M_数字孪生_线缆连接_展示);
|
||||
|
@ -225,6 +226,7 @@ public class UIToCabinet : MonoBehaviour
|
|||
default:
|
||||
break;
|
||||
}
|
||||
createLine.deletxianLan(CabinetUIManager.Instance.current_menu);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -542,13 +542,13 @@ public class GameManager : MonoBehaviour
|
|||
go.transform.position = new Vector3(anchorPos.transform.position.x, anchorPos.transform.position.y + collider.bounds.size.y / 2, anchorPos.transform.position.z);
|
||||
//go.transform.rotation = item.transform.Find("U位/" + U).rotation;
|
||||
go.name = Racks[i].id;
|
||||
if (!go.GetComponent<ClickEvent>())
|
||||
go.AddComponent<ClickEvent>();
|
||||
|
||||
DragController drag = gameObject.GetComponent<DeviceManager>().dragController.GetComponent<DragController>();
|
||||
drag.oriObjectPrefab = go.GetComponent<DragTest1>();
|
||||
drag.uPosManger = item.transform.Find("U位").GetComponent<UPosManger>();
|
||||
//drag.CountUPos(drag.oriObjectPrefab, Convert.ToInt32(Racks[i].devicePosition) - 1);
|
||||
//go.GetComponent<DragTest>().isplace = true;
|
||||
drag.CountUPos(drag.oriObjectPrefab, Convert.ToInt32(Racks[i].devicePosition) - 1);
|
||||
|
||||
|
||||
go.transform.SetParent(item.transform.Find("U位/" + U));
|
||||
//go.GetComponent<DragTest>().isplace = true;
|
||||
//Array.ForEach(go.transform.GetComponentsInChildren<DragTest>(), (item) =>
|
||||
|
@ -1786,6 +1786,12 @@ public class GameManager : MonoBehaviour
|
|||
return (d != null && d.deviceList.type == "1");
|
||||
}
|
||||
|
||||
public bool IsFindParent_UPosManger(GameObject go)
|
||||
{
|
||||
UPosManger d = go.GetComponent<UPosManger>();
|
||||
return (d != null);
|
||||
}
|
||||
|
||||
// 读取地址
|
||||
public IEnumerator LoadAddress(Action<string> callback)
|
||||
{
|
||||
|
|
|
@ -66,32 +66,32 @@ public class RedactPort : MonoBehaviour
|
|||
IMapper mapper;
|
||||
private void OnEnable()
|
||||
{
|
||||
config = new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.CreateMap<RedactPort.Body, PortQuery.PortList>();
|
||||
cfg.CreateMap<PortQuery.PortList, RedactPort.Body>();
|
||||
});
|
||||
mapper = config.CreateMapper();
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GameManager.Inst.nowDeviceID))
|
||||
{
|
||||
for (int i = 0; i < GameManager.Inst.TmsPorts.Count; i++)
|
||||
{
|
||||
if (GameManager.Inst.TmsPorts[i].id == GameManager.Inst.nowDeviceID)
|
||||
{
|
||||
portlist = GameManager.Inst.TmsPorts[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
mybody = mapper.Map<RedactPort.Body>(portlist);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.StackTrace + "**********" + e.Message);
|
||||
}
|
||||
|
||||
//config = new MapperConfiguration(cfg =>
|
||||
//{
|
||||
// cfg.CreateMap<RedactPort.Body, PortQuery.PortList>();
|
||||
// cfg.CreateMap<PortQuery.PortList, RedactPort.Body>();
|
||||
//});
|
||||
//mapper = config.CreateMapper();
|
||||
//try
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(GameManager.Inst.nowDeviceID))
|
||||
// {
|
||||
// for (int i = 0; i < GameManager.Inst.TmsPorts.Count; i++)
|
||||
// {
|
||||
// if (GameManager.Inst.TmsPorts[i].id == GameManager.Inst.nowDeviceID)
|
||||
// {
|
||||
// portlist = GameManager.Inst.TmsPorts[i];
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// mybody = mapper.Map<RedactPort.Body>(portlist);
|
||||
// }
|
||||
//}
|
||||
//catch (Exception e)
|
||||
//{
|
||||
// Debug.Log(e.StackTrace + "**********" + e.Message);
|
||||
//}
|
||||
syncInfo();
|
||||
#region 正式
|
||||
init();
|
||||
port.text = mybody.port;
|
||||
|
@ -125,6 +125,72 @@ public class RedactPort : MonoBehaviour
|
|||
#endregion
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步信息
|
||||
/// </summary>
|
||||
public void syncInfo(string nowDeviceID)
|
||||
{
|
||||
mybody = new Body();
|
||||
|
||||
config = new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.CreateMap<RedactPort.Body, PortQuery.PortList>();
|
||||
cfg.CreateMap<PortQuery.PortList, RedactPort.Body>();
|
||||
});
|
||||
mapper = config.CreateMapper();
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GameManager.Inst.nowDeviceID))
|
||||
{
|
||||
for (int i = 0; i < GameManager.Inst.TmsPorts.Count; i++)
|
||||
{
|
||||
if (GameManager.Inst.TmsPorts[i].id == GameManager.Inst.nowDeviceID)
|
||||
{
|
||||
portlist = GameManager.Inst.TmsPorts[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
mybody = mapper.Map<RedactPort.Body>(portlist);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.StackTrace + "**********" + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 同步信息
|
||||
/// </summary>
|
||||
public void syncInfo()
|
||||
{
|
||||
config = new MapperConfiguration(cfg =>
|
||||
{
|
||||
cfg.CreateMap<RedactPort.Body, PortQuery.PortList>();
|
||||
cfg.CreateMap<PortQuery.PortList, RedactPort.Body>();
|
||||
});
|
||||
mapper = config.CreateMapper();
|
||||
try
|
||||
{
|
||||
if (!string.IsNullOrEmpty(GameManager.Inst.nowDeviceID))
|
||||
{
|
||||
for (int i = 0; i < GameManager.Inst.TmsPorts.Count; i++)
|
||||
{
|
||||
if (GameManager.Inst.TmsPorts[i].id == GameManager.Inst.nowDeviceID)
|
||||
{
|
||||
portlist = GameManager.Inst.TmsPorts[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
mybody = mapper.Map<RedactPort.Body>(portlist);
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log(e.StackTrace + "**********" + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取端口的对联设备和对联端口选项
|
||||
/// </summary>
|
||||
|
@ -165,6 +231,7 @@ public class RedactPort : MonoBehaviour
|
|||
conPort.options.Clear();
|
||||
conPort.AddOptions(conPort_list);
|
||||
|
||||
cableGroupName.options.Clear();
|
||||
foreach (var item in LineQuery.Inst.keyValues.Keys)
|
||||
{
|
||||
Dropdown.OptionData optionData = new Dropdown.OptionData(item);
|
||||
|
@ -202,9 +269,10 @@ public class RedactPort : MonoBehaviour
|
|||
}
|
||||
}
|
||||
|
||||
public IEnumerator Succeed()
|
||||
public IEnumerator Succeed(Action<string> callback = null)
|
||||
{
|
||||
yield return StartCoroutine(GameManager.Inst.Initialize());
|
||||
callback?.Invoke("1");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -70,14 +70,9 @@ public class LineQuery : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
//else
|
||||
//{
|
||||
// keyValues.Clear();
|
||||
//}
|
||||
else
|
||||
{
|
||||
string lineContentJson = "这是测试";
|
||||
yield return StartCoroutine(SaveJsonCoroutine(lineContentJson));
|
||||
keyValues.Clear();
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -210,6 +205,72 @@ public class LineQuery : MonoBehaviour
|
|||
})
|
||||
);
|
||||
}
|
||||
|
||||
// 删除线缆
|
||||
public IEnumerable deleteCableName(string cableGroupName, string CableName, Action<string> callback = null)
|
||||
{
|
||||
var xianlan = GameObject.Find("线缆").GetComponentsInChildren<LineInfor>();
|
||||
var info = Array.Find(xianlan, (item) =>
|
||||
{
|
||||
return (item.cableGroupName == cableGroupName && item.cableName == CableName);
|
||||
});
|
||||
|
||||
RedactPort redact = PatternChoose.Inst.transform.Find("端口类/端口配置").GetComponent<RedactPort>();
|
||||
|
||||
redact.syncInfo(info.lines[0].GetComponent<PortQuery>().portList.id);
|
||||
|
||||
|
||||
redact.mybody.conDevice = null;
|
||||
redact.mybody.conPort = null;
|
||||
redact.mybody.conDeviceName = null;
|
||||
redact.mybody.cableGroupName = null;
|
||||
redact.mybody.cableName = null;
|
||||
|
||||
string newData = JsonConvert.SerializeObject(redact.mybody);
|
||||
yield return StartCoroutine(
|
||||
CombineJSON.UpdateJson_POST(GameManager.Inst.Jk_URL.dk_bj, GameManager.Inst.arguments.token, newData, (jsonResult) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
redact.URlreturn = JsonConvert.DeserializeObject<RedactPort.Root>(jsonResult);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.Log("删除端口线缆名接口错误:" + e.Message);
|
||||
}
|
||||
if (redact.URlreturn != null && redact.URlreturn.message == "操作成功")
|
||||
{
|
||||
StartCoroutine(redact.Succeed());
|
||||
|
||||
Array.ForEach(GameManager.Inst.pop_ups.ToArray(), (itme) =>
|
||||
{
|
||||
itme.gameObject.SetActive(false);
|
||||
});
|
||||
}
|
||||
}
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region JSON
|
||||
[System.Serializable]
|
||||
|
|
|
@ -108,6 +108,8 @@ public class ClickEvent : MonoBehaviour
|
|||
GameManager.Inst.search_box.SetActive(false);
|
||||
var d = gameObject.GetComponent<DeviceQuery>();
|
||||
|
||||
DragController drag = GameManager.Inst.gameObject.GetComponent<DeviceManager>().dragController.GetComponent<DragController>();
|
||||
|
||||
if (d)
|
||||
{
|
||||
if (string.IsNullOrEmpty(d.deviceList.id))
|
||||
|
@ -129,7 +131,16 @@ public class ClickEvent : MonoBehaviour
|
|||
|
||||
GameManager.Inst.nowDeviceID = d.deviceList.id;
|
||||
GameManager.Inst.nowDevice = gameObject;
|
||||
|
||||
|
||||
|
||||
if (drag)
|
||||
{
|
||||
drag.uPosManger = GameManager.Inst.FindParent(gameObject, GameManager.Inst.IsFindParent_UPosManger).GetComponent<UPosManger>();
|
||||
GameManager.Inst.gameObject.GetComponent<DeviceManager>().uposManger = drag.uPosManger;
|
||||
drag.oriObjectPrefab = gameObject.GetComponent<DragTest1>();
|
||||
gameObject.GetComponent<DeviceItem>().OnselfClick();
|
||||
}
|
||||
//PatternChoose.Inst.transform.Find("É豸Àà/É豸ÅäÖÃ").gameObject.SetActive(true);//¡Ì
|
||||
}
|
||||
}
|
||||
|
|
|
@ -152,12 +152,15 @@ public class CreateLine : CabinetUIBase
|
|||
|
||||
lineRenderer.SetPositions(vector3s.ToArray());
|
||||
|
||||
var p = A.GetComponent<PortQuery>().portList;
|
||||
go.transform.SetParent(xianLan);
|
||||
go.name = A.GetComponent<PortQuery>().portList.cableGroupName;
|
||||
go.name = p.cableGroupName;
|
||||
go.SetActive(false);
|
||||
var l = go.AddComponent<LineInfor>();
|
||||
l.lines.Add(A);
|
||||
l.lines.Add(B);
|
||||
l.cableGroupName = p.cableGroupName;
|
||||
l.cableName = p.cableName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -220,12 +223,15 @@ public class CreateLine : CabinetUIBase
|
|||
|
||||
lineRenderer.SetPositions(vector3s.ToArray());
|
||||
|
||||
var p = A.GetComponent<PortQuery>().portList;
|
||||
go.transform.SetParent(xianLan);
|
||||
go.name = A.GetComponent<PortQuery>().portList.cableGroupName;
|
||||
go.name = p.cableGroupName;
|
||||
go.SetActive(false);
|
||||
var l = go.AddComponent<LineInfor>();
|
||||
l.lines.Add(A);
|
||||
l.lines.Add(B);
|
||||
l.cableGroupName = p.cableGroupName;
|
||||
l.cableName = p.cableName;
|
||||
}
|
||||
|
||||
[ContextMenu("同行")]
|
||||
|
@ -290,15 +296,21 @@ public class CreateLine : CabinetUIBase
|
|||
}
|
||||
else
|
||||
{
|
||||
Debug.Log(11);
|
||||
for (int i = 0; i < xianLan.childCount; i++)
|
||||
deletxianLan(menu);
|
||||
}
|
||||
}
|
||||
|
||||
public void deletxianLan(Menu menu)
|
||||
{
|
||||
Destroy(xianLan.GetChild(i).gameObject);
|
||||
}
|
||||
for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
|
||||
if ((menu == Menu.M_数字孪生_线缆连接_展示))
|
||||
return;
|
||||
for (int i = xianLan.childCount - 1; i >= 0; i--)
|
||||
{
|
||||
GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F2();
|
||||
}
|
||||
}
|
||||
DestroyImmediate(xianLan.GetChild(i).gameObject);
|
||||
}
|
||||
//for (int i = 0; i < GameManager.Inst.Cabinets_go.Count; i++)
|
||||
//{
|
||||
// GameManager.Inst.Cabinets_go[i].GetComponent<TransparentGlow>().F2();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,8 @@ public class LineInfor : MonoBehaviour
|
|||
[HideInInspector] public Root root;
|
||||
|
||||
public List<Transform> lines = new List<Transform>();
|
||||
public string cableGroupName = "";
|
||||
public string cableName = "";
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue