From 345b96e5f7faa056ac826a11a09413503ede8c40 Mon Sep 17 00:00:00 2001 From: yulong <1838206582@qq.com> Date: Thu, 28 Nov 2024 17:47:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/OutlineEffect/OutlineEffect/Outline.cs | 2 +- .../UIPanel/UI_DeviceBaseInfoPanel.prefab | 36 +++---- Assets/Scenes/TobaccoModelTest.unity | 6 +- Assets/Scripts/Machine.cs | 34 +++--- Assets/Scripts/MqttManager.cs | 12 +-- Assets/Scripts/ShelfBoxModel.cs | 73 ++++++++++++- Assets/Scripts/YL/AddConfing.cs | 9 ++ Assets/Scripts/YL/Batteryanimation.cs | 16 +-- Assets/Scripts/YL/Carinformation.cs | 18 ++-- Assets/Scripts/YL/Conveyordata.cs | 90 ++++++++-------- Assets/Scripts/YL/DeviceBaseInfoPanel.cs | 30 ++++-- Assets/Scripts/YL/Fetchbox.cs | 4 +- Assets/Scripts/YL/Hoistmovement.cs | 6 +- Assets/Scripts/YL/Interaction.cs | 60 +++++------ Assets/Scripts/YL/InterfaceManager.cs | 4 +- Assets/Scripts/YL/Palletizertent.cs | 32 +++--- Assets/Scripts/YL/Warehousingdata.cs | 102 +++++++++--------- 17 files changed, 310 insertions(+), 224 deletions(-) diff --git a/Assets/OutlineEffect/OutlineEffect/Outline.cs b/Assets/OutlineEffect/OutlineEffect/Outline.cs index 12486c9..02195bc 100644 --- a/Assets/OutlineEffect/OutlineEffect/Outline.cs +++ b/Assets/OutlineEffect/OutlineEffect/Outline.cs @@ -89,7 +89,7 @@ namespace cakeslice if (gameObject == this.gameObject) { OutlineEffect.Instance?.AddOutline(this); - Debug.Log("添加自身"); + //Debug.Log("添加自身"); } } diff --git a/Assets/Resources/UIPanel/UI_DeviceBaseInfoPanel.prefab b/Assets/Resources/UIPanel/UI_DeviceBaseInfoPanel.prefab index f42e8c7..853e70b 100644 --- a/Assets/Resources/UIPanel/UI_DeviceBaseInfoPanel.prefab +++ b/Assets/Resources/UIPanel/UI_DeviceBaseInfoPanel.prefab @@ -842,18 +842,18 @@ MonoBehaviour: m_EditorClassIdentifier: Offbutton: {fileID: 1967769933896122839} Nametext: {fileID: 2832750592810490090} - Cartext: {fileID: 0} - Controlstext: {fileID: 0} - Positiontext: {fileID: 0} - Traytext: {fileID: 0} - Operationtext: {fileID: 0} - Palletnumbertext: {fileID: 0} - Electriccurrenttext: {fileID: 0} - Tasknumbertext: {fileID: 0} - Forewarningtext: {fileID: 0} - Electriccurrent: {fileID: 0} - cornertext: {fileID: 0} - Startingpointtext: {fileID: 0} + Cartext: {fileID: 8214587630045679791} + Controlstext: {fileID: 724016295191915131} + Positiontext: {fileID: 2102059219000202236} + Traytext: {fileID: 9137864884139978621} + Operationtext: {fileID: 5287221882741405251} + Palletnumbertext: {fileID: 2689658055422251704} + Electriccurrenttext: {fileID: 5331507430992219371} + Tasknumbertext: {fileID: 1167695471745680679} + Forewarningtext: {fileID: 6996425904101367134} + Electriccurrent: {fileID: 8031836240900020043} + cornertext: {fileID: 4880839109823032860} + Startingpointtext: {fileID: 8663134943857761581} Endpointtext: {fileID: 0} --- !u!114 &4345099692778011899 MonoBehaviour: @@ -2397,7 +2397,7 @@ GameObject: m_Icon: {fileID: 0} m_NavMeshLayer: 0 m_StaticEditorFlags: 0 - m_IsActive: 1 + m_IsActive: 0 --- !u!224 &4981066486433477416 RectTransform: m_ObjectHideFlags: 0 @@ -3373,8 +3373,8 @@ RectTransform: 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: -111.83811, y: 0} - m_SizeDelta: {x: 44.1239, y: 30} + m_AnchoredPosition: {x: -96.2067, y: 0} + m_SizeDelta: {x: 75.3867, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &9202582539698206056 CanvasRenderer: @@ -3417,7 +3417,7 @@ MonoBehaviour: m_HorizontalOverflow: 0 m_VerticalOverflow: 0 m_LineSpacing: 1 - m_Text: "\u8D77\u70B9:" + m_Text: "\u7535\u6C60\u6E29\u5EA6:" --- !u!1 &8072997215142622437 GameObject: m_ObjectHideFlags: 0 @@ -3770,8 +3770,8 @@ RectTransform: 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: 36.2685, y: 0} - m_SizeDelta: {x: 239.5643, y: 30} + m_AnchoredPosition: {x: 53.69472, y: 0} + m_SizeDelta: {x: 204.7086, y: 30} m_Pivot: {x: 0.5, y: 0.5} --- !u!222 &408455293543405364 CanvasRenderer: diff --git a/Assets/Scenes/TobaccoModelTest.unity b/Assets/Scenes/TobaccoModelTest.unity index 6ac4b91..f3991c5 100644 --- a/Assets/Scenes/TobaccoModelTest.unity +++ b/Assets/Scenes/TobaccoModelTest.unity @@ -7006,11 +7006,11 @@ Transform: m_GameObject: {fileID: 108631930} serializedVersion: 2 m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -960, y: -540, z: 0} + m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalScale: {x: 1, y: 1, z: 1} m_ConstrainProportionsScale: 0 m_Children: [] - m_Father: {fileID: 796359296} + m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!114 &108631933 MonoBehaviour: @@ -46321,7 +46321,6 @@ RectTransform: - {fileID: 640309425} - {fileID: 667812694} - {fileID: 617481941} - - {fileID: 108631931} m_Father: {fileID: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 0} @@ -179363,6 +179362,7 @@ SceneRoots: - {fileID: 756277251} - {fileID: 543450651877670947} - {fileID: 1291014530} + - {fileID: 108631931} - {fileID: 796359296} - {fileID: 467125167} - {fileID: 743278749} diff --git a/Assets/Scripts/Machine.cs b/Assets/Scripts/Machine.cs index 5b87145..0fa2b6c 100644 --- a/Assets/Scripts/Machine.cs +++ b/Assets/Scripts/Machine.cs @@ -53,7 +53,7 @@ public class Machine : MonoBehaviour int index = int.Parse(roboticarm.Jobcontent); if (index != Number && worksta != Number2) { - Debug.Log("˵ò" + index); + //Debug.Log("˵ò" + index); Motionexecution(roboticarm.Jobcontent, roboticarm); Number2 = worksta; } @@ -64,7 +64,7 @@ public class Machine : MonoBehaviour if (index > 1) { Init(); - Debug.Log("еֱ۳ʼ" + roboticarm.Jobcontent); + //Debug.Log("еֱ۳ʼ" + roboticarm.Jobcontent); } ispcon = true; } @@ -99,7 +99,7 @@ public class Machine : MonoBehaviour if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Number = 1; - Debug.Log("ȡ"); + //Debug.Log("ȡ"); Transform point = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); transform.DOMove(point.position, (Vector3.Distance(transform.position, point.position) / speed)).SetEase(Ease.InOutQuad).OnComplete(() => { @@ -112,7 +112,7 @@ public class Machine : MonoBehaviour case "2": if (roboticarm.Workstation == "10" || roboticarm.Workstation == "9") { - Debug.Log("Ϣ"); + //Debug.Log("Ϣ"); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -133,7 +133,7 @@ public class Machine : MonoBehaviour case "3": if (roboticarm.Workstation == "10" || roboticarm.Workstation == "9") { - Debug.Log("ȥ"); + //Debug.Log("ȥ"); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -153,7 +153,7 @@ public class Machine : MonoBehaviour case "4": if (roboticarm.Workstation != "10" || roboticarm.Workstation != "9") { - Debug.Log("ι"); + //Debug.Log("ι"); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -173,7 +173,7 @@ public class Machine : MonoBehaviour case "5": if (roboticarm.Workstation == "10" || roboticarm.Workstation == "9") { - Debug.Log("ɨ"); + //Debug.Log("ɨ"); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -194,7 +194,7 @@ public class Machine : MonoBehaviour case "6": if (roboticarm.Workstation == "10" || roboticarm.Workstation == "9") { - Debug.Log(""); + //Debug.Log(""); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -214,7 +214,7 @@ public class Machine : MonoBehaviour case "7": if (roboticarm.Workstation == "10" || roboticarm.Workstation == "9") { - Debug.Log("Ӹ"); + //Debug.Log("Ӹ"); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform box = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -234,7 +234,7 @@ public class Machine : MonoBehaviour case "8": if (roboticarm.Workstation.Length > 2) { - Debug.Log(""); + //Debug.Log(""); if (MqttManager.Instance.Mechanicalarm(roboticarm.Workstation)) { Transform point = MqttManager.Instance.Mechanicalarm(roboticarm.Workstation); @@ -254,7 +254,7 @@ public class Machine : MonoBehaviour } break; default: - Debug.Log("û"); + //Debug.Log("û"); break; } } @@ -360,7 +360,7 @@ public class Machine : MonoBehaviour box.transform.localEulerAngles = new Vector3(0, 0, 0); box.transform.SetParent(this.points); - Debug.Log("ɾһӦ"); + //Debug.Log("ɾһӦ"); } else if (points.childCount == 1) { @@ -369,11 +369,11 @@ public class Machine : MonoBehaviour box.transform.position = this.points.transform.position; box.transform.localEulerAngles = new Vector3(0, 0, 0); box.transform.SetParent(this.points); - Debug.Log("ɾڶӦ"); + //Debug.Log("ɾڶӦ"); } else { - Debug.Log("Ҳɾ"); + //Debug.Log("Ҳɾ"); } } } @@ -387,12 +387,12 @@ public class Machine : MonoBehaviour Transform points = MqttManager.Instance.GetTransformByName(point); if (points.childCount == 0) { - Debug.Log("ӵһ"); + //Debug.Log("ӵһ"); boxdata = Instantiate(Box, points.transform); } else if (points.childCount == 1) { - Debug.Log("ӵڶ"); + //Debug.Log("ӵڶ"); GameObject box = points.GetChild(0).gameObject; if (box) { @@ -410,7 +410,7 @@ public class Machine : MonoBehaviour if (points.transform.childCount > 0) { GameObject game = points.transform.GetChild(0).gameObject; - Destroy(game); + //Destroy(game); } } } diff --git a/Assets/Scripts/MqttManager.cs b/Assets/Scripts/MqttManager.cs index 676fd70..80620ff 100644 --- a/Assets/Scripts/MqttManager.cs +++ b/Assets/Scripts/MqttManager.cs @@ -147,7 +147,7 @@ public class MqttManager : MonoSingleton if (messageQueue.TryDequeue(out string message)) { // 处理消息 - Debug.Log($"剩余:{messageQueue.Count}条数据,取数据-----> {message}"); + //Debug.Log($"剩余:{messageQueue.Count}条数据,取数据-----> {message}"); //await UniTask.Delay(10); Allequipment str = JsonConvert.DeserializeObject(message); //Debug.Log("接收到的数据" + str); @@ -265,7 +265,7 @@ public class MqttManager : MonoSingleton if (machines[index].Id == roboticarm.id) { machines[index].Getarm(roboticarm); - Debug.Log("调用对应机械手臂" + roboticarm.id); + //Debug.Log("调用对应机械手臂" + roboticarm.id); } } break; @@ -276,7 +276,7 @@ public class MqttManager : MonoSingleton } else { - Debug.Log("等待数据"); + //Debug.Log("等待数据"); await UniTask.Delay(1000); } } @@ -320,7 +320,7 @@ public class MqttManager : MonoSingleton /// public void Deletebox(string boxid, Boxinformation boxinformation) { - Debug.Log("删除前箱子个数" + boxinformationList.Count); + //Debug.Log("删除前箱子个数" + boxinformationList.Count); if (boxinformationList.Count > 0) { for (int i = 0; i < boxinformationList.Count; i++) @@ -332,11 +332,11 @@ public class MqttManager : MonoSingleton } } } - Debug.Log("删除了箱子个数" + boxinformationList.Count); + //Debug.Log("删除了箱子个数" + boxinformationList.Count); if (boxinformation) { boxinformationList.Add(boxinformation); - Debug.Log("添加后箱子个数" + boxinformationList.Count); + // Debug.Log("添加后箱子个数" + boxinformationList.Count); } } diff --git a/Assets/Scripts/ShelfBoxModel.cs b/Assets/Scripts/ShelfBoxModel.cs index 184b076..3bb0f27 100644 --- a/Assets/Scripts/ShelfBoxModel.cs +++ b/Assets/Scripts/ShelfBoxModel.cs @@ -588,6 +588,11 @@ namespace DefaultNamespace [Serializable] public class Result { + public string jobID; + /// + /// + /// + public string isOnline; /// /// /// @@ -595,23 +600,79 @@ namespace DefaultNamespace /// /// /// + public string batCurrent; + /// + /// + /// + public string batTemperature; + /// + /// + /// + public string batVoltage; + /// + /// + /// public string boxCode; /// /// /// - public string car_Layer; + public string boxCode2; /// /// /// - public string car_X; + public string carPlt; /// /// /// - public string car_Y; + public string carAngle; /// /// /// - public string carPLT; + public string carBit; + /// + /// + /// + public string carColumn; + /// + /// + /// + public string carID; + /// + /// + /// + public string carLayer; + /// + /// + /// + public string carMode; + /// + /// + /// + public string carRow; + /// + /// + /// + public string carRunState; + /// + /// + /// + public string carSpace; + /// + /// + /// + public string carWorkState; + /// + /// + /// + public string carX; + /// + /// + /// + public string carY; + /// + /// + /// + public string carZone; /// /// /// @@ -632,6 +693,10 @@ namespace DefaultNamespace /// /// public string error5; + /// + /// + /// + public string jobState; } /// /// 小车请求头文件 diff --git a/Assets/Scripts/YL/AddConfing.cs b/Assets/Scripts/YL/AddConfing.cs index edaa0da..44b4f7b 100644 --- a/Assets/Scripts/YL/AddConfing.cs +++ b/Assets/Scripts/YL/AddConfing.cs @@ -5,6 +5,7 @@ using System.Net; using Unity.VisualScripting.FullSerializer; using UnityEngine; using UnityEngine.Networking; +using UnityEngine.SceneManagement; using static InterfaceManager; public class AddConfing : MonoBehaviour @@ -47,4 +48,12 @@ public class AddConfing : MonoBehaviour } } + public void Restart() + { + string currentSceneName = SceneManager.GetActiveScene().name; + + // // صǰ൱ + SceneManager.LoadScene(currentSceneName); + // Debug.Log("г"); + } } diff --git a/Assets/Scripts/YL/Batteryanimation.cs b/Assets/Scripts/YL/Batteryanimation.cs index e0f389d..0a75e35 100644 --- a/Assets/Scripts/YL/Batteryanimation.cs +++ b/Assets/Scripts/YL/Batteryanimation.cs @@ -72,7 +72,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز1"); + //Debug.Log("ز1"); } //Takebattery(point1, point5); } @@ -82,7 +82,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز2"); + //Debug.Log("ز2"); } // Putbattery(point1, point5); } @@ -92,7 +92,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز3"); + //Debug.Log("ز3"); } //Batterywithdrawal(point2, point6); } @@ -102,7 +102,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز4"); + //Debug.Log("ز4"); } //Dischargecell(point2, point6); } @@ -112,7 +112,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز5"); + //Debug.Log("ز5"); } //Batterywithdrawal(point3, point7); } @@ -122,7 +122,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز6"); + //Debug.Log("ز6"); } //Dischargecell(point3, point7); } @@ -132,7 +132,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز7"); + //Debug.Log("ز7"); } //Batterywithdrawal(point4, point8); } @@ -142,7 +142,7 @@ public class Batteryanimation : MonoBehaviour if (batterytoggle != battery2) { Switchanimation(batterytoggle); - Debug.Log("ز8"); + //Debug.Log("ز8"); } //Dischargecell(point4, point8); } diff --git a/Assets/Scripts/YL/Carinformation.cs b/Assets/Scripts/YL/Carinformation.cs index 67318b8..8467dc4 100644 --- a/Assets/Scripts/YL/Carinformation.cs +++ b/Assets/Scripts/YL/Carinformation.cs @@ -111,7 +111,7 @@ public class Carinformation : MonoBehaviour /// public void Designateddisplacement(Vector3 dis, float speed) { - Debug.Log("С˶"); + //Debug.Log("С˶"); float times = Vector3.Distance(transform.position, dis) / speed; transform.DOMove(dis, times).SetEase(Ease.InOutQuad); } @@ -132,14 +132,14 @@ public class Carinformation : MonoBehaviour string urls = Tasknumber + boxdata; StartCoroutine(Getstring(urls, (data) => { - Debug.Log("" + data); + //Debug.Log("" + data); Initdata initdata = JsonUtility.FromJson(data); if (initdata != null && BoxID) { GameObject box = Instantiate(BoxID, transform); Boxtasknumber boxtasknumber = box.GetComponent(); boxtasknumber.ID = boxdata; - Debug.Log("Сʼ" + boxtasknumber.ID); + //Debug.Log("Сʼ" + boxtasknumber.ID); switch (initdata.result[0].palletType) { case "Qbox": @@ -214,12 +214,12 @@ public class Carinformation : MonoBehaviour box.gameObject.transform.position = triggerTop; box.gameObject.transform.SetParent(transform, false); - Debug.Log("λóʼ"); + //Debug.Log("λóʼ"); //MqttManager.Instance.Deletebox(boxinformation.ID, boxinformation); } else { - Debug.LogError("ûײ"); + //Debug.LogError("ûײ"); } if (layer.Equals(1)) { @@ -302,14 +302,14 @@ public class Carinformation : MonoBehaviour public void Pointid(string id, Boxtasknumber boxtasknumber, Boxinformation boxinformation) { string url = Tasknumber + id; - Debug.Log("СӿID" + boxtasknumber.ID); + //Debug.Log("СӿID" + boxtasknumber.ID); StartCoroutine(Getstring(url, (data) => { - Debug.Log("Сӿڷص" + data); + //Debug.Log("Сӿڷص" + data); Initdata initdata = JsonUtility.FromJson(data); - boxinformation.locationId = initdata.result[0].sloc; + boxinformation.locationId = initdata.result[0].dloc; boxtasknumber.ID = null; - Debug.Log("Сid" + boxtasknumber.ID + "СlocationId" + boxinformation.locationId); + //Debug.Log("Сid" + boxtasknumber.ID + "СlocationId" + boxinformation.locationId); })); } } diff --git a/Assets/Scripts/YL/Conveyordata.cs b/Assets/Scripts/YL/Conveyordata.cs index 804fe9e..f103f82 100644 --- a/Assets/Scripts/YL/Conveyordata.cs +++ b/Assets/Scripts/YL/Conveyordata.cs @@ -95,13 +95,13 @@ public class Conveyordata : MonoBehaviour if (Points.GetChild(0).childCount == 1) { Reverseposition(); - Debug.Log("˫ͻת" + convoyorequipment.Id); + //Debug.Log("˫ͻת" + convoyorequipment.Id); } } } else { - Debug.Log("˫ͻ" + convoyorequipment.Id); + //Debug.Log("˫ͻ" + convoyorequipment.Id); } } else @@ -109,7 +109,7 @@ public class Conveyordata : MonoBehaviour if (convoyorequipment.TaskNumber != "0" && convoyorequipment.LowerBoxNumber != "0" && convoyorequipment.ForwardRotation == "True") { Forwardposition(); - Debug.Log("ͻ" + convoyorequipment.Id); + //Debug.Log("ͻ" + convoyorequipment.Id); } } } @@ -117,13 +117,13 @@ public class Conveyordata : MonoBehaviour { if (convoyorequipment.TaskNumber != "0" && convoyorequipment.LowerBoxNumber != "0" && convoyorequipment.ForwardRotation == "True") { - Debug.Log("ת" + convoyorequipment.Id); + //Debug.Log("ת" + convoyorequipment.Id); Forwardposition(); } else if (convoyorequipment.ReverseRotation == "True") { - Debug.Log("ⷴת" + convoyorequipment.Id); + //Debug.Log("ⷴת" + convoyorequipment.Id); Reverseposition2(); } @@ -132,7 +132,7 @@ public class Conveyordata : MonoBehaviour //ʼ if (convoyorequipment.BoxesNumber != "0" && !ispcon) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.BoxesNumber == "2" && ID == "5430" && !ispcon) { Hoistmovement hoistmovement = transform.GetComponent(); @@ -140,7 +140,7 @@ public class Conveyordata : MonoBehaviour { if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos(convoyorequipment, hoistmovement.Downpoint); @@ -152,7 +152,7 @@ public class Conveyordata : MonoBehaviour } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos2(convoyorequipment, hoistmovement.UPpoint); @@ -172,7 +172,7 @@ public class Conveyordata : MonoBehaviour { if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos(convoyorequipment, hoistmovement.Downpoint); @@ -184,7 +184,7 @@ public class Conveyordata : MonoBehaviour } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos2(convoyorequipment, hoistmovement.UPpoint); @@ -202,7 +202,7 @@ public class Conveyordata : MonoBehaviour Hoistmovement hoistmovement = transform.GetComponent(); if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos(convoyorequipment, hoistmovement.Downpoint); @@ -214,7 +214,7 @@ public class Conveyordata : MonoBehaviour } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos2(convoyorequipment, hoistmovement.UPpoint); @@ -231,7 +231,7 @@ public class Conveyordata : MonoBehaviour Hoistmovement hoistmovement = transform.GetComponent(); if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos(convoyorequipment, hoistmovement.Downpoint); @@ -243,7 +243,7 @@ public class Conveyordata : MonoBehaviour } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.LowerBoxNumber != "0") { IntiPos2(convoyorequipment, hoistmovement.UPpoint); @@ -265,13 +265,13 @@ public class Conveyordata : MonoBehaviour if (convoyorequipment.BoxesNumber == "1" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame2, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } } @@ -280,13 +280,13 @@ public class Conveyordata : MonoBehaviour if (convoyorequipment.BoxesNumber == "1" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame2, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } } @@ -295,13 +295,13 @@ public class Conveyordata : MonoBehaviour if (convoyorequipment.BoxesNumber == "1" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame2, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } } @@ -329,7 +329,7 @@ public class Conveyordata : MonoBehaviour else { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame2, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } } @@ -344,7 +344,7 @@ public class Conveyordata : MonoBehaviour else { Boxquantity2(int.Parse(convoyorequipment.BoxesNumber), Boxgame2, Points); - Debug.Log("ûɫʼ"); + //Debug.Log("ûɫʼ"); ispcon = true; } } @@ -370,24 +370,24 @@ public class Conveyordata : MonoBehaviour box.transform.SetParent(null); box.transform.DOMove(Antipoint2.position, (Vector3.Distance(box.transform.position, Antipoint2.transform.position) / Speed)).SetEase(Ease.InOutQuad).OnComplete(() => { - Debug.Log("ת"); + //Debug.Log("ת"); box.transform.SetParent(Antipoint2); }); } else { - Debug.Log("ӵڿ"); + //Debug.Log("ӵڿ"); } } else { - Debug.Log("߷ת"); + //Debug.Log("߷ת"); } } } else { - Debug.Log("ɶҲ"); + //Debug.Log("ɶҲ"); } } /// @@ -533,7 +533,7 @@ public class Conveyordata : MonoBehaviour Initdata initdata = JsonUtility.FromJson(data); if (initdata != null) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); Boxtasknumber boxtasknumber = box.GetComponent(); boxtasknumber.ID = boxid; switch (initdata.result[0].palletType) @@ -684,12 +684,12 @@ public class Conveyordata : MonoBehaviour { if (index / 2 == 0 && boxid.TaskNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } } @@ -697,12 +697,12 @@ public class Conveyordata : MonoBehaviour { if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + // Debug.Log("ת"); Forwardposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } } @@ -791,12 +791,12 @@ public class Conveyordata : MonoBehaviour MqttManager.Instance.firstbox.Add(box); if (boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } else if (boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } } @@ -841,24 +841,24 @@ public class Conveyordata : MonoBehaviour box.transform.SetParent(null); box.transform.DOMove(Antipoint2.position, (Vector3.Distance(box.transform.position, Antipoint2.transform.position) / Speed)).SetEase(Ease.InOutQuad).OnComplete(() => { - Debug.Log("ת"); + //Debug.Log("ת"); box.transform.SetParent(Antipoint2); }); } else { - Debug.Log("ӵڿ"); + //Debug.Log("ӵڿ"); } } else { - Debug.Log("߷ת"); + //Debug.Log("߷ת"); } } } else { - Debug.Log("ɶҲ"); + //Debug.Log("ɶҲ"); } } /// @@ -945,12 +945,12 @@ public class Conveyordata : MonoBehaviour { if (index / 2 == 0 && boxid.TaskNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } } @@ -958,12 +958,12 @@ public class Conveyordata : MonoBehaviour { if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } } @@ -1056,12 +1056,12 @@ public class Conveyordata : MonoBehaviour { if (index / 2 == 0 && boxid.TaskNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } } @@ -1069,12 +1069,12 @@ public class Conveyordata : MonoBehaviour { if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ForwardRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Forwardposition(); } else if (boxid.TaskNumber != "0" && boxid.LowerBoxNumber != "0" && boxid.ReverseRotation == "True") { - Debug.Log("ת"); + //Debug.Log("ת"); Reverseposition(); } } diff --git a/Assets/Scripts/YL/DeviceBaseInfoPanel.cs b/Assets/Scripts/YL/DeviceBaseInfoPanel.cs index a514490..182f94c 100644 --- a/Assets/Scripts/YL/DeviceBaseInfoPanel.cs +++ b/Assets/Scripts/YL/DeviceBaseInfoPanel.cs @@ -8,7 +8,7 @@ public class DeviceBaseInfoPanel : MonoBehaviour { public Button Offbutton; public Text Nametext, Cartext, Controlstext, Positiontext, Traytext, Operationtext, Palletnumbertext, Electriccurrenttext, Tasknumbertext, Forewarningtext, - Electriccurrent, cornertext, Startingpointtext, Endpointtext; + Electriccurrent, cornertext, Startingpointtext; void Start() { @@ -18,15 +18,28 @@ public class DeviceBaseInfoPanel : MonoBehaviour }); } - public void Getdata(string Name,string Car,string Controls,string Positiont,string Tray,string Operation,string Palletnumber,string Electriccurrent,string Tasknumber,string Forewarn,string - Ect,string Corner,string Starting,string Endpoint,Action action) + public void Getdata(string Car, string Controls, string Positiont, string Tray, string Operation, string Palletnumber, string Electriccurrent, string Tasknumber, string Forewarn, string + Ect, string Corner, string Starting, Action action) { - //this.Nametext.text = Name; - this.Cartext.text = Car; - this.Controlstext.text = Controls; + this.Cartext.text = "С" + Car; + if (Controls == "1") + { + this.Controlstext.text = ""; + } + else if (Controls == "2") + { + this.Controlstext.text = "æ"; + } this.Palletnumbertext.text = Positiont; - this.Traytext.text = Tray; - this.Operationtext.text = Operation; + this.Traytext.text = Tray; + if (Operation == "True") + { + this.Operationtext.text = ""; + } + else if (Operation == "False") + { + this.Operationtext.text = ""; + } this.Palletnumbertext.text = Palletnumber; this.Electriccurrenttext.text = Electriccurrent; this.Tasknumbertext.text = Tasknumber; @@ -34,7 +47,6 @@ public class DeviceBaseInfoPanel : MonoBehaviour this.Electriccurrenttext.text = Ect; this.cornertext.text = Corner; this.Startingpointtext.text = Starting; - this.Endpointtext.text = Endpoint; Offbutton.onClick.AddListener(() => { action?.Invoke(); diff --git a/Assets/Scripts/YL/Fetchbox.cs b/Assets/Scripts/YL/Fetchbox.cs index 66eb4c1..2b5debe 100644 --- a/Assets/Scripts/YL/Fetchbox.cs +++ b/Assets/Scripts/YL/Fetchbox.cs @@ -73,7 +73,7 @@ public class Fetchbox : MonoBehaviour { if (data != null) { - Debug.Log(data); + //Debug.Log(data); shelfBoxModel = JsonUtility.FromJson(data); for (int i = 0; i < shelfBoxModel.result.Count; i++) { @@ -183,7 +183,7 @@ public class Fetchbox : MonoBehaviour { //Destroy(Box); - Debug.LogWarning($"δҵΪ {boxname} ĸ彫ɾ"); + //Debug.LogWarning($"δҵΪ {boxname} ĸ彫ɾ"); } } } diff --git a/Assets/Scripts/YL/Hoistmovement.cs b/Assets/Scripts/YL/Hoistmovement.cs index fdb6079..b6b6e5e 100644 --- a/Assets/Scripts/YL/Hoistmovement.cs +++ b/Assets/Scripts/YL/Hoistmovement.cs @@ -39,13 +39,13 @@ public class Hoistmovement : MonoBehaviour if (elvequipment.CurrentLayer == "1") { Floor = 1; - Debug.Log("һ"); + //Debug.Log("һ"); Alayer(); } else if (elvequipment.CurrentLayer == "2") { Floor = 2; - Debug.Log(""); + //Debug.Log(""); Layertwo(); } } @@ -98,7 +98,7 @@ public class Hoistmovement : MonoBehaviour /// public void Designateddisplacement(Vector3 dis, float speed) { - Debug.Log("ƶ"); + //Debug.Log("ƶ"); float times = Vector3.Distance(transform.position, dis) / speed; transform.DOMove(dis, times).SetEase(Ease.InOutQuad); } diff --git a/Assets/Scripts/YL/Interaction.cs b/Assets/Scripts/YL/Interaction.cs index 9e2d906..66d1748 100644 --- a/Assets/Scripts/YL/Interaction.cs +++ b/Assets/Scripts/YL/Interaction.cs @@ -118,40 +118,40 @@ public class Interaction : MonoBehaviour { if (hit.collider.CompareTag("Car")) { - //Carinformation carinformation = hit.collider.gameObject.GetComponent(); - ////Debug.Log(carinformation.ID); - //string url = Carinterface + carinformation.ID; - //StartCoroutine(Post1(url, (data) => - //{ - // UIDeviceBaseInfoPanel.gameObject.SetActive(true); - // // Debug.Log(data); - // Debug.Log("С" + data); - // Cardata cardata = JsonUtility.FromJson(data); - // UIDeviceBaseInfoPanel.Getdata(cardata.type, "С" + cardata.result.id, cardata.result.id, cardata.result.boxCode, cardata.result.car_Layer, cardata.result.car_X, cardata.result.car_Y, - // cardata.result.carPLT, cardata.result.error1, cardata.result.error2, cardata.result.error3, cardata.result.error4, cardata.result.error5, "", () => - // { - // Removeprompt(); - // UIDeviceBaseInfoPanel.gameObject.SetActive(false); - // }); - - //})); + Carinformation carinformation = hit.collider.gameObject.GetComponent(); + //Debug.Log(carinformation.ID); + string url = Carinterface + carinformation.ID; + StartCoroutine(Post1(url, (data) => + { + // Debug.Log(data); + Debug.Log("С" + data); + Cardata cardata = JsonUtility.FromJson(data); + string pos = cardata.result.carRow + "-" + cardata.result.carColumn + "-" + cardata.result.carLayer + ""; + UIDeviceBaseInfoPanel.Getdata(cardata.result.id, cardata.result.carMode, pos, cardata.result.carPlt, cardata.result.isOnline, cardata.result.boxCode, cardata.result.batCurrent, cardata.result.jobID, + cardata.result.error1, cardata.result.batVoltage, cardata.result.carAngle, cardata.result.batTemperature, () => + { + Removeprompt(); + UIDeviceBaseInfoPanel.gameObject.SetActive(false); + }); + UIDeviceBaseInfoPanel.gameObject.SetActive(true); + })); } else if (hit.collider.CompareTag("Box")) { - Debug.Log(gameObject.name); + //Debug.Log(gameObject.name); if (hit.collider.gameObject.GetComponent()) { - Debug.Log("ID" + hit.collider.gameObject.GetComponent().ID); + //Debug.Log("ID" + hit.collider.gameObject.GetComponent().ID); if (hit.collider.gameObject.GetComponent().ID.Length > 0) { - Debug.Log(""); - Debug.Log(hit.collider.gameObject.GetComponent().ID); + // Debug.Log(""); + //Debug.Log(hit.collider.gameObject.GetComponent().ID); Boxtasknumber boxtasknumber = hit.collider.gameObject.GetComponent(); string url = Tasknumber + boxtasknumber.ID; - Debug.Log(url); + //Debug.Log(url); StartCoroutine(Getstring(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Initdata initdata = JsonUtility.FromJson(data); for (int i = 0; i < initdata.result.Count; i++) { @@ -172,7 +172,7 @@ public class Interaction : MonoBehaviour string url = Boxinformationface + boxinformation.locationId; StartCoroutine(Post1(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Cigaretteinformation cigaretteinformation = JsonUtility.FromJson(data); // Debug.Log(cigaretteinformation.time); for (int i = 0; i < cigaretteinformation.result.Count; i++) @@ -197,7 +197,7 @@ public class Interaction : MonoBehaviour } else { - Debug.Log(""); + //Debug.Log(""); } } @@ -261,9 +261,9 @@ public class Interaction : MonoBehaviour // Debug.Log(url); StartCoroutine(Post1(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Batterydata batterydata = JsonUtility.FromJson(data); - Debug.Log(batterydata.result.id); + //Debug.Log(batterydata.result.id); UIReplacebattery.Getbattery(batterydata.result.equipmentPlaneNumber, batterydata.result.taskNumber, batterydata.result.batteryStatus0, batterydata.result.batteryStatus1, batterydata.result.batteryStatus2, batterydata.result.batteryStatus3, batterydata.result.retractingClaws, batterydata.result.upperInPlace, batterydata.result.lowerInPlace, batterydata.result.hookClawInPlace, batterydata.result.clawRetractedInPlace, batterydata.result.walkingAirSwitchFault, batterydata.result.liftAirSwitchFault, batterydata.result.walkControllerFault, batterydata.result.liftControllerFault, batterydata.result.forkExtensionTimeoutFault, batterydata.result.forkRetractionTimeoutFault, () => @@ -305,7 +305,7 @@ public class Interaction : MonoBehaviour // Debug.Log(url); StartCoroutine(Post1(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Conveyors intothe = JsonUtility.FromJson(data); //Debug.Log(intothe.result.id); UIConveyorpanel.Getconvey(intothe.result.equipmentPlaneNumber, intothe.result.taskNumber, intothe.result.upperBoxNumber, intothe.result.startingAddress, intothe.result.upperBoxTobaccoWeight, intothe.result.destinationAddress, intothe.result.lowerBoxNumber, @@ -327,7 +327,7 @@ public class Interaction : MonoBehaviour //Debug.Log(url); StartCoroutine(Post1(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Feequipments feequipments = JsonUtility.FromJson(data); //Debug.Log(feequipments.result.id); UIFloorelevator.Getfloorele(feequipments.result.deviceStatus, feequipments.result.upperInPlace, feequipments.result.ascent, feequipments.result.upperLimitInspection, @@ -350,7 +350,7 @@ public class Interaction : MonoBehaviour //Debug.Log(url); StartCoroutine(Post1(url, (data) => { - Debug.Log(data); + //Debug.Log(data); Decappingmachine decappingmachine = JsonUtility.FromJson(data); // Debug.Log(decappingmachine.result.id); UICoverremovalmachine.Getdecap(decappingmachine.result.equipmentPlaneNumber, decappingmachine.result.caseLidStatus, decappingmachine.result.frontInPlaceInspection, decappingmachine.result.rearInPlaceInspection, decappingmachine.result.frontDecelerationInspection, diff --git a/Assets/Scripts/YL/InterfaceManager.cs b/Assets/Scripts/YL/InterfaceManager.cs index 5274d22..0ac0d7b 100644 --- a/Assets/Scripts/YL/InterfaceManager.cs +++ b/Assets/Scripts/YL/InterfaceManager.cs @@ -18,7 +18,7 @@ public static class InterfaceManager } } } - private static string _Port = "8083"; + private static string _Port = "5005"; public static string Port { get { return _Port; } @@ -39,7 +39,7 @@ public static class InterfaceManager /// /// ȡСӿ /// - public static string Carinterface { get => IpAddress + "/api/kepserver/car_Info/"; } + public static string Carinterface { get => IpAddress + "/api/kepserver/car_Info?car_id="; } /// /// ȡ /// diff --git a/Assets/Scripts/YL/Palletizertent.cs b/Assets/Scripts/YL/Palletizertent.cs index 1cf73d9..b46eaec 100644 --- a/Assets/Scripts/YL/Palletizertent.cs +++ b/Assets/Scripts/YL/Palletizertent.cs @@ -106,7 +106,7 @@ public class Palletizertent : MonoBehaviour Armobj.transform.DOMoveY(Armobj.transform.position.y + 0.2f, 0.2f).SetEase(Ease.InOutQuad).OnComplete(() => { GameObject box = Instantiate(Boxgame, Points.transform); - Debug.Log("ʼֱ۵λ"); + //Debug.Log("ʼֱ۵λ"); box.gameObject.transform.SetParent(Armobj.transform); MqttManager.Instance.firstbox.Add(box); if (dpmequipment.boxesNumber == "0" && dpmequipment.DownInPlace == "True") @@ -119,7 +119,7 @@ public class Palletizertent : MonoBehaviour } else { - Debug.Log("û"); + //Debug.Log("û"); } }); } @@ -137,7 +137,7 @@ public class Palletizertent : MonoBehaviour { renderer.material = Specialkernelbox; } - Debug.Log("ʼֱ۵λ"); + //Debug.Log("ʼֱ۵λ"); box.gameObject.transform.SetParent(Armobj.transform); MqttManager.Instance.firstbox.Add(box); if (dpmequipment.boxesNumber == "0" && dpmequipment.DownInPlace == "True") @@ -150,7 +150,7 @@ public class Palletizertent : MonoBehaviour } else { - Debug.Log("û"); + //Debug.Log("û"); } }); } @@ -163,9 +163,9 @@ public class Palletizertent : MonoBehaviour Initdata initdata = JsonUtility.FromJson(data); if (initdata != null && Boxgame) { - Debug.Log("ʼ" + data); + //Debug.Log("ʼ" + data); GameObject box = Instantiate(Boxgame, Points.transform); - Debug.Log("ɶӦλ"); + //Debug.Log("ɶӦλ"); Boxtasknumber boxtasknumber = box.GetComponent(); boxtasknumber.ID = initdata.result[0].transferId; switch (initdata.result[0].palletType) @@ -233,7 +233,7 @@ public class Palletizertent : MonoBehaviour { Armobj.transform.DOMoveY(Armobj.transform.position.y + 0.2f, 0.2f).SetEase(Ease.InOutQuad).OnComplete(() => { - Debug.Log("ʼֱ۵λ"); + //Debug.Log("ʼֱ۵λ"); box.gameObject.transform.SetParent(Armobj.transform); MqttManager.Instance.firstbox.Add(box); }); @@ -248,7 +248,7 @@ public class Palletizertent : MonoBehaviour } else { - Debug.Log("û"); + //Debug.Log("û"); } } })); @@ -259,10 +259,10 @@ public class Palletizertent : MonoBehaviour /// private void Centreposition() { - Debug.Log("еλǷ"); + //Debug.Log("еλǷ"); if (Armobj.transform.childCount > 0 && Haveabox.childCount > 0) { - Debug.Log("ִеλ"); + //Debug.Log("ִеλ"); GameObject box = Armobj.transform.GetChild(0).gameObject; GameObject box2 = Haveabox.transform.GetChild(0).gameObject; if (box2 != null) @@ -291,7 +291,7 @@ public class Palletizertent : MonoBehaviour //Debug.Log("ײ"); box.transform.SetParent(Haveabox.transform); Armobj.transform.DOMoveY(Armobj.transform.position.y - 0.23f, 0.2f).SetEase(Ease.InOutQuad); - Debug.Log("ִеλ"); + //Debug.Log("ִеλ"); } } } @@ -320,7 +320,7 @@ public class Palletizertent : MonoBehaviour // box.AddComponent(); // box.GetComponent().ID = task; //} - Debug.Log(""); + // Debug.Log(""); }); } } @@ -332,14 +332,14 @@ public class Palletizertent : MonoBehaviour Armobj.transform.DOMoveY(Armobj.transform.position.y - 1.03f, 0.5f).SetEase(Ease.InOutQuad).OnComplete(() => { box.transform.SetParent(Armobj.transform); - Debug.Log("һ"); + // Debug.Log("һ"); Armobj.transform.DOMoveY(Armobj.transform.position.y + 1.23f, 0.6f).SetEase(Ease.InOutQuad); }); } } else { - Debug.Log("ɶҲ"); + //Debug.Log("ɶҲ"); } } } @@ -357,13 +357,13 @@ public class Palletizertent : MonoBehaviour GameObject box = Armobj.transform.GetChild(0).gameObject; box.transform.SetParent(Haveabox); Armobj.transform.DOMoveY(Armobj.transform.position.y + 1.03f, 0.4f).SetEase(Ease.InOutQuad); - Debug.Log("ִµλ"); + //Debug.Log("ִµλ"); } }); } else { - Debug.Log("ɶҲ"); + //Debug.Log("ɶҲ"); } } } diff --git a/Assets/Scripts/YL/Warehousingdata.cs b/Assets/Scripts/YL/Warehousingdata.cs index ee947f9..37fe1a1 100644 --- a/Assets/Scripts/YL/Warehousingdata.cs +++ b/Assets/Scripts/YL/Warehousingdata.cs @@ -91,19 +91,19 @@ public class Warehousingdata : MonoBehaviour { //IntiPos(convoyorequipment, hoistmovement.Downpoint); Colourdata2(convoyorequipment.LowerBoxNumber, hoistmovement.Downpoint); - Debug.Log("һɫ"); + //Debug.Log("һɫ"); } else if (hoistmovement.Floor == 2) { //IntiPos2(convoyorequipment, hoistmovement.UPpoint); Colourdata2(convoyorequipment.LowerBoxNumber, hoistmovement.UPpoint); - Debug.Log("ɫ"); + //Debug.Log("ɫ"); } } } else { - Debug.Log("ûָλòҪıɫ"); + //Debug.Log("ûָλòҪıɫ"); } if (ID == "5204") { @@ -148,29 +148,29 @@ public class Warehousingdata : MonoBehaviour if (convoyorequipment.ForwardRotation == "True") { Intotheforword(); - Debug.Log(convoyorequipment.Id + ""); + //Debug.Log(convoyorequipment.Id + ""); } else if (convoyorequipment.ReverseRotation == "True") { Tothereversal(); - Debug.Log(convoyorequipment.Id + ""); + //Debug.Log(convoyorequipment.Id + ""); } } else if (convoyorequipment.Id != "5203" && convoyorequipment.Id != "5236" && convoyorequipment.ForwardRotation == "True" && convoyorequipment.TaskNumber != "0") { Intotheforword(); - Debug.Log(convoyorequipment.Id + ""); + //Debug.Log(convoyorequipment.Id + ""); } else if (convoyorequipment.Id != "5203" && convoyorequipment.Id != "5236" && convoyorequipment.ReverseRotation == "True" && convoyorequipment.TaskNumber != "0") { Tothereversal(); - Debug.Log(convoyorequipment.Id + ""); + //Debug.Log(convoyorequipment.Id + ""); } } //ʼ if (convoyorequipment.BoxesNumber != "0" && !ispcon) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); if (convoyorequipment.BoxesNumber != "0" && ID == "5203" && !ispcon) { Hoistmovement hoistmovement = transform.GetComponent(); @@ -178,13 +178,13 @@ public class Warehousingdata : MonoBehaviour { if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); //IntiPos(convoyorequipment, hoistmovement.Downpoint); Upmachine(convoyorequipment, Boxgame2, hoistmovement.Downpoint); } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); // IntiPos2(convoyorequipment, hoistmovement.UPpoint); Upmachine(convoyorequipment, Boxgame2, hoistmovement.UPpoint); } @@ -198,12 +198,12 @@ public class Warehousingdata : MonoBehaviour { if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); IntiPos(convoyorequipment, hoistmovement.Downpoint); } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); IntiPos2(convoyorequipment, hoistmovement.UPpoint); } } @@ -216,12 +216,12 @@ public class Warehousingdata : MonoBehaviour { if (hoistmovement.Floor == 1) { - Debug.Log("ʼһ"); + //Debug.Log("ʼһ"); IntiPos(convoyorequipment, hoistmovement.Downpoint); } else if (hoistmovement.Floor == 2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); IntiPos2(convoyorequipment, hoistmovement.UPpoint); } } @@ -232,13 +232,13 @@ public class Warehousingdata : MonoBehaviour { if (convoyorequipment.BoxesNumber == "1" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame, Points); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame2, Points); ispcon = true; } @@ -247,13 +247,13 @@ public class Warehousingdata : MonoBehaviour { if (convoyorequipment.BoxesNumber == "1" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine(convoyorequipment, Boxgame, Points); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine(convoyorequipment, Boxgame2, Points); ispcon = true; } @@ -262,13 +262,13 @@ public class Warehousingdata : MonoBehaviour { if (convoyorequipment.BoxesNumber == "1" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame, Points); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame2, Points); ispcon = true; } @@ -277,13 +277,13 @@ public class Warehousingdata : MonoBehaviour { if (convoyorequipment.TaskNumber != "0" && convoyorequipment.LowerBoxNumber != "0" && convoyorequipment.BoxesNumber == "1" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Init(convoyorequipment); ispcon = true; } else if (convoyorequipment.TaskNumber != "0" && convoyorequipment.LowerBoxNumber != "0" && convoyorequipment.BoxesNumber == "2" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Init2(convoyorequipment); ispcon = true; } @@ -292,13 +292,13 @@ public class Warehousingdata : MonoBehaviour { if (convoyorequipment.BoxesNumber == "1" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame, Points); ispcon = true; } else if (convoyorequipment.BoxesNumber == "2" && !ispcon) { - Debug.Log("ʼ" + convoyorequipment.Id); + //Debug.Log("ʼ" + convoyorequipment.Id); Upmachine2(convoyorequipment, Boxgame2, Points); ispcon = true; } @@ -321,13 +321,13 @@ public class Warehousingdata : MonoBehaviour box.transform.DOMove(Onschedule.position, (Vector3.Distance(box.transform.position, Onschedule.transform.position) / Speed)).SetEase(Ease.InOutQuad).OnComplete(() => { box.transform.SetParent(Onschedule); - Debug.Log("5236"); + //Debug.Log("5236"); }); } } else { - Debug.Log("ǰӲת"); + //Debug.Log("ǰӲת"); } } @@ -345,13 +345,13 @@ public class Warehousingdata : MonoBehaviour box.transform.DOMove(Onschedule2.position, (Vector3.Distance(box.transform.position, Onschedule2.transform.position) / Speed)).SetEase(Ease.InOutQuad).OnComplete(() => { box.transform.SetParent(Onschedule2); - Debug.Log("5236"); + //Debug.Log("5236"); }); } } else { - Debug.Log("ǰӲת"); + //Debug.Log("ǰӲת"); } } @@ -433,7 +433,7 @@ public class Warehousingdata : MonoBehaviour default: break; } - Debug.Log("ӶӦɫ"); + //Debug.Log("ӶӦɫ"); } })); } @@ -513,7 +513,7 @@ public class Warehousingdata : MonoBehaviour default: break; } - Debug.Log("ӶӦɫ"); + //Debug.Log("ӶӦɫ"); } })); } @@ -530,7 +530,7 @@ public class Warehousingdata : MonoBehaviour Initdata initdata = JsonUtility.FromJson(data); if (initdata != null && Boxgame2) { - Debug.Log("ʼ"); + //Debug.Log("ʼ"); GameObject box = Instantiate(Boxgame2, transform); Boxtasknumber boxtasknumber = box.GetComponent(); boxtasknumber.ID = boxid.LowerBoxNumber; @@ -642,23 +642,23 @@ public class Warehousingdata : MonoBehaviour if (boxid.ForwardRotation == "True") { Intotheforword(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } else if (boxid.ReverseRotation == "True") { Tothereversal(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } } else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ForwardRotation == "True" && boxid.TaskNumber != "0") { Intotheforword(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ReverseRotation == "True" && boxid.TaskNumber != "0") { Tothereversal(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } } })); @@ -783,23 +783,23 @@ public class Warehousingdata : MonoBehaviour if (boxid.ForwardRotation == "True") { Intotheforword(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } else if (boxid.ReverseRotation == "True") { Tothereversal(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } } else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ForwardRotation == "True" && boxid.TaskNumber != "0") { Intotheforword(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ReverseRotation == "True" && boxid.TaskNumber != "0") { Tothereversal(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } } })); @@ -823,7 +823,7 @@ public class Warehousingdata : MonoBehaviour } else { - Debug.Log("ǰӲת"); + //Debug.Log("ǰӲת"); } } @@ -849,7 +849,7 @@ public class Warehousingdata : MonoBehaviour } else { - Debug.Log("ǰӲת"); + //Debug.Log("ǰӲת"); } } @@ -865,34 +865,34 @@ public class Warehousingdata : MonoBehaviour { if (Antipoint2.childCount == 0) { - Debug.Log("Էת"); + //Debug.Log("Էת"); GameObject box = Antipoint1.transform.GetChild(0).gameObject; if (box != null) { - Debug.Log("ȡת"); + //Debug.Log("ȡת"); box.transform.SetParent(null); box.transform.DOMove(Antipoint2.position, (Vector3.Distance(box.transform.position, Antipoint2.transform.position) / Speed)).SetEase(Ease.InOutQuad).OnComplete(() => { - Debug.Log("ת"); + //Debug.Log("ת"); box.transform.SetParent(Antipoint2); }); } } else { - Debug.Log("תͻж˶"); + //Debug.Log("תͻж˶"); } } } else if (transform.GetComponent() != null) { - Debug.Log("ת"); + //Debug.Log("ת"); Hoistmovement hoistmovement = transform.GetComponent(); if (hoistmovement) { if (hoistmovement.Downpoint.transform.childCount > 0 && Reversing) { - Debug.Log("תһ"); + //Debug.Log("תһ"); GameObject box = hoistmovement.Downpoint.transform.GetChild(0).gameObject; if (box) { @@ -905,7 +905,7 @@ public class Warehousingdata : MonoBehaviour } else if (hoistmovement.UPpoint.transform.childCount > 0 && Reversing2) { - Debug.Log("תڶ"); + //Debug.Log("תڶ"); GameObject box = hoistmovement.UPpoint.transform.GetChild(0).gameObject; if (box) { @@ -920,7 +920,7 @@ public class Warehousingdata : MonoBehaviour } else { - Debug.Log("ûзת"); + //Debug.Log("ûзת"); } } /// @@ -1140,12 +1140,12 @@ public class Warehousingdata : MonoBehaviour else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ForwardRotation == "True" && boxid.TaskNumber != "0") { Intotheforword(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } else if (boxid.Id != "5203" && boxid.Id != "5236" && boxid.ReverseRotation == "True" && boxid.TaskNumber != "0") { Tothereversal(); - Debug.Log(boxid.Id + ""); + //Debug.Log(boxid.Id + ""); } }