This commit is contained in:
yulong 2024-11-28 17:47:33 +08:00
parent 6fc00a7724
commit 345b96e5f7
17 changed files with 310 additions and 224 deletions

View File

@ -89,7 +89,7 @@ namespace cakeslice
if (gameObject == this.gameObject)
{
OutlineEffect.Instance?.AddOutline(this);
Debug.Log("添加自身");
//Debug.Log("添加自身");
}
}

View File

@ -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:

View File

@ -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}

View File

@ -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);
}
}
}

View File

@ -147,7 +147,7 @@ public class MqttManager : MonoSingleton<MqttManager>
if (messageQueue.TryDequeue(out string message))
{
// 处理消息
Debug.Log($"剩余:{messageQueue.Count}条数据,取数据-----> {message}");
//Debug.Log($"剩余:{messageQueue.Count}条数据,取数据-----> {message}");
//await UniTask.Delay(10);
Allequipment str = JsonConvert.DeserializeObject<Allequipment>(message);
//Debug.Log("接收到的数据" + str);
@ -265,7 +265,7 @@ public class MqttManager : MonoSingleton<MqttManager>
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<MqttManager>
}
else
{
Debug.Log("等待数据");
//Debug.Log("等待数据");
await UniTask.Delay(1000);
}
}
@ -320,7 +320,7 @@ public class MqttManager : MonoSingleton<MqttManager>
/// <param name="boxid"></param>
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<MqttManager>
}
}
}
Debug.Log("删除了箱子个数" + boxinformationList.Count);
//Debug.Log("删除了箱子个数" + boxinformationList.Count);
if (boxinformation)
{
boxinformationList.Add(boxinformation);
Debug.Log("添加后箱子个数" + boxinformationList.Count);
// Debug.Log("添加后箱子个数" + boxinformationList.Count);
}
}

View File

@ -588,6 +588,11 @@ namespace DefaultNamespace
[Serializable]
public class Result
{
public string jobID;
/// <summary>
///
/// </summary>
public string isOnline;
/// <summary>
///
/// </summary>
@ -595,23 +600,79 @@ namespace DefaultNamespace
/// <summary>
///
/// </summary>
public string batCurrent;
/// <summary>
///
/// </summary>
public string batTemperature;
/// <summary>
///
/// </summary>
public string batVoltage;
/// <summary>
///
/// </summary>
public string boxCode;
/// <summary>
///
/// </summary>
public string car_Layer;
public string boxCode2;
/// <summary>
///
/// </summary>
public string car_X;
public string carPlt;
/// <summary>
///
/// </summary>
public string car_Y;
public string carAngle;
/// <summary>
///
/// </summary>
public string carPLT;
public string carBit;
/// <summary>
///
/// </summary>
public string carColumn;
/// <summary>
///
/// </summary>
public string carID;
/// <summary>
///
/// </summary>
public string carLayer;
/// <summary>
///
/// </summary>
public string carMode;
/// <summary>
///
/// </summary>
public string carRow;
/// <summary>
///
/// </summary>
public string carRunState;
/// <summary>
///
/// </summary>
public string carSpace;
/// <summary>
///
/// </summary>
public string carWorkState;
/// <summary>
///
/// </summary>
public string carX;
/// <summary>
///
/// </summary>
public string carY;
/// <summary>
///
/// </summary>
public string carZone;
/// <summary>
///
/// </summary>
@ -632,6 +693,10 @@ namespace DefaultNamespace
///
/// </summary>
public string error5;
/// <summary>
///
/// </summary>
public string jobState;
}
/// <summary>
/// 小车请求头文件

View File

@ -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("重新运行场景");
}
}

View File

@ -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);
}

View File

@ -111,7 +111,7 @@ public class Carinformation : MonoBehaviour
/// <param name="speed"></param>
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<Initdata>(data);
if (initdata != null && BoxID)
{
GameObject box = Instantiate(BoxID, transform);
Boxtasknumber boxtasknumber = box.GetComponent<Boxtasknumber>();
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<Initdata>(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);
}));
}
}

View File

@ -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<Hoistmovement>();
@ -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<Hoistmovement>();
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<Hoistmovement>();
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("啥也不是");
}
}
/// <summary>
@ -533,7 +533,7 @@ public class Conveyordata : MonoBehaviour
Initdata initdata = JsonUtility.FromJson<Initdata>(data);
if (initdata != null)
{
Debug.Log("初始化完成");
//Debug.Log("初始化完成");
Boxtasknumber boxtasknumber = box.GetComponent<Boxtasknumber>();
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("啥也不是");
}
}
/// <summary>
@ -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();
}
}

View File

@ -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();

View File

@ -73,7 +73,7 @@ public class Fetchbox : MonoBehaviour
{
if (data != null)
{
Debug.Log(data);
//Debug.Log(data);
shelfBoxModel = JsonUtility.FromJson<ShelfBoxModel>(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} 的父对象。物体将被删除。");
}
}
}

View File

@ -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
/// </summary>
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);
}

View File

@ -118,40 +118,40 @@ public class Interaction : MonoBehaviour
{
if (hit.collider.CompareTag("Car"))
{
//Carinformation carinformation = hit.collider.gameObject.GetComponent<Carinformation>();
////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<Cardata>(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<Carinformation>();
//Debug.Log(carinformation.ID);
string url = Carinterface + carinformation.ID;
StartCoroutine(Post1(url, (data) =>
{
// Debug.Log(data);
Debug.Log("小车返回数据" + data);
Cardata cardata = JsonUtility.FromJson<Cardata>(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<Boxtasknumber>())
{
Debug.Log("ID" + hit.collider.gameObject.GetComponent<Boxtasknumber>().ID);
//Debug.Log("ID" + hit.collider.gameObject.GetComponent<Boxtasknumber>().ID);
if (hit.collider.gameObject.GetComponent<Boxtasknumber>().ID.Length > 0)
{
Debug.Log("暂无数据");
Debug.Log(hit.collider.gameObject.GetComponent<Boxtasknumber>().ID);
// Debug.Log("暂无数据");
//Debug.Log(hit.collider.gameObject.GetComponent<Boxtasknumber>().ID);
Boxtasknumber boxtasknumber = hit.collider.gameObject.GetComponent<Boxtasknumber>();
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<Initdata>(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<Cigaretteinformation>(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<Batterydata>(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<Conveyors>(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<Feequipments>(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<Decappingmachine>(data);
// Debug.Log(decappingmachine.result.id);
UICoverremovalmachine.Getdecap(decappingmachine.result.equipmentPlaneNumber, decappingmachine.result.caseLidStatus, decappingmachine.result.frontInPlaceInspection, decappingmachine.result.rearInPlaceInspection, decappingmachine.result.frontDecelerationInspection,

View File

@ -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
/// <summary>
/// 获取小车接口
/// </summary>
public static string Carinterface { get => IpAddress + "/api/kepserver/car_Info/"; }
public static string Carinterface { get => IpAddress + "/api/kepserver/car_Info?car_id="; }
/// <summary>
/// 获取提升机弹窗
/// </summary>

View File

@ -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<Initdata>(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>();
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
/// </summary>
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<BoxCollider>();
// box.GetComponent<Boxtasknumber>().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("放箱子啥也不是");
}
}
}

View File

@ -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<Hoistmovement>();
@ -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<Initdata>(data);
if (initdata != null && Boxgame2)
{
Debug.Log("初始化完成");
//Debug.Log("初始化完成");
GameObject box = Instantiate(Boxgame2, transform);
Boxtasknumber boxtasknumber = box.GetComponent<Boxtasknumber>();
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<Hoistmovement>() != null)
{
Debug.Log("提升机反转");
//Debug.Log("提升机反转");
Hoistmovement hoistmovement = transform.GetComponent<Hoistmovement>();
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("没有反转条件");
}
}
/// <summary>
@ -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 + "反传");
}
}