8/21
This commit is contained in:
parent
3020574d6c
commit
e36413a9c3
File diff suppressed because it is too large
Load Diff
|
@ -1080,7 +1080,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 6020242228778469068}
|
- component: {fileID: 6020242228778469068}
|
||||||
- component: {fileID: 6020242228778469067}
|
- component: {fileID: 6020242228778469067}
|
||||||
m_Layer: 6
|
m_Layer: 8
|
||||||
m_Name: "\u62A5\u8B66"
|
m_Name: "\u62A5\u8B66"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
|
|
|
@ -694,7 +694,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 6206996799886426826}
|
- component: {fileID: 6206996799886426826}
|
||||||
- component: {fileID: 2305191433559606241}
|
- component: {fileID: 2305191433559606241}
|
||||||
m_Layer: 6
|
m_Layer: 8
|
||||||
m_Name: "\u6444\u50CF\u5934_web"
|
m_Name: "\u6444\u50CF\u5934_web"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
|
|
|
@ -35,7 +35,7 @@ RectTransform:
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 20, y: -2}
|
m_AnchoredPosition: {x: 20, y: -2.7}
|
||||||
m_SizeDelta: {x: 320, y: 120}
|
m_SizeDelta: {x: 320, y: 120}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &1000062609473158365
|
--- !u!222 &1000062609473158365
|
||||||
|
@ -247,7 +247,7 @@ RectTransform:
|
||||||
m_ConstrainProportionsScale: 0
|
m_ConstrainProportionsScale: 0
|
||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 6206996800505932346}
|
m_Father: {fileID: 6206996800505932346}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 1
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
|
@ -394,11 +394,11 @@ RectTransform:
|
||||||
- {fileID: 6206996799658441976}
|
- {fileID: 6206996799658441976}
|
||||||
- {fileID: 785272239001180448}
|
- {fileID: 785272239001180448}
|
||||||
m_Father: {fileID: 6206996800505932346}
|
m_Father: {fileID: 6206996800505932346}
|
||||||
m_RootOrder: 1
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0.5, y: 0.5}
|
m_AnchorMin: {x: 0.5, y: 0.5}
|
||||||
m_AnchorMax: {x: 0.5, y: 0.5}
|
m_AnchorMax: {x: 0.5, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 70, y: 0}
|
m_AnchoredPosition: {x: 61.41, y: 2.2}
|
||||||
m_SizeDelta: {x: 120, y: 57}
|
m_SizeDelta: {x: 120, y: 57}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!222 &6206996800221561031
|
--- !u!222 &6206996800221561031
|
||||||
|
@ -423,7 +423,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 2100000, guid: 3a3b5242babc65a4c898f644975a9f50, type: 2}
|
m_Material: {fileID: 2100000, guid: 3a3b5242babc65a4c898f644975a9f50, type: 2}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
@ -492,14 +492,14 @@ RectTransform:
|
||||||
m_LocalScale: {x: 0.02, y: 0.019999998, z: 0.019999998}
|
m_LocalScale: {x: 0.02, y: 0.019999998, z: 0.019999998}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 6206996799779127824}
|
|
||||||
- {fileID: 6206996800221561050}
|
- {fileID: 6206996800221561050}
|
||||||
|
- {fileID: 6206996799779127824}
|
||||||
m_Father: {fileID: 6206996799886426826}
|
m_Father: {fileID: 6206996799886426826}
|
||||||
m_RootOrder: 0
|
m_RootOrder: 0
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0}
|
||||||
m_AnchorMax: {x: 0, y: 0}
|
m_AnchorMax: {x: 0, y: 0}
|
||||||
m_AnchoredPosition: {x: 0, y: 0}
|
m_AnchoredPosition: {x: -0.15, y: 0}
|
||||||
m_SizeDelta: {x: 1, y: 1}
|
m_SizeDelta: {x: 1, y: 1}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!223 &6206996800505932326
|
--- !u!223 &6206996800505932326
|
||||||
|
|
|
@ -437,7 +437,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 6206996799886426826}
|
- component: {fileID: 6206996799886426826}
|
||||||
- component: {fileID: 2773670996583366210}
|
- component: {fileID: 2773670996583366210}
|
||||||
m_Layer: 6
|
m_Layer: 8
|
||||||
m_Name: "\u7EA2\u5916\u7EBF"
|
m_Name: "\u7EA2\u5916\u7EBF"
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
m_Icon: {fileID: 0}
|
m_Icon: {fileID: 0}
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,6 +6,7 @@ public class CabinetUIBase : MonoBehaviour
|
||||||
{
|
{
|
||||||
public virtual void OnMenuChanged(Menu menu)
|
public virtual void OnMenuChanged(Menu menu)
|
||||||
{
|
{
|
||||||
|
if(WebInteraction.Inst.isWorkPlay&& menu!= Menu.M_全景监控_现场作业)
|
||||||
|
WebInteraction.Inst.CloseTicket();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,14 +30,14 @@ public class SpUI : MonoBehaviour, IPointerEnterHandler, IPointerExitHandler
|
||||||
case "ζÈ":
|
case "ζÈ":
|
||||||
my_image.sprite = wendu_selected;
|
my_image.sprite = wendu_selected;
|
||||||
expand_image.sprite = wendu_expand;
|
expand_image.sprite = wendu_expand;
|
||||||
textMeshPro.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_W.pointStatus;
|
textMeshPro.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_W.collectResult;
|
||||||
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_W.pointStatus;
|
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_W.collectResult;
|
||||||
break;
|
break;
|
||||||
case "ʪ¶È":
|
case "ʪ¶È":
|
||||||
my_image.sprite = shidu_selected;
|
my_image.sprite = shidu_selected;
|
||||||
expand_image.sprite = shidu_expand;
|
expand_image.sprite = shidu_expand;
|
||||||
textMeshPro.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_S.pointStatus;
|
textMeshPro.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_S.collectResult;
|
||||||
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_S.pointStatus;
|
text.text = transform.parent.parent.parent.GetComponent<ENVQuery>().eNVList_S.collectResult;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -52,7 +52,10 @@ public class UIToCabinet : MonoBehaviour
|
||||||
case "Toggle_现场作业":
|
case "Toggle_现场作业":
|
||||||
PatternChoose.Inst.transform.Find("Panel搜索框").GetComponent<SearchName>().LoadCabinet();
|
PatternChoose.Inst.transform.Find("Panel搜索框").GetComponent<SearchName>().LoadCabinet();
|
||||||
if (BoolMonitor.Value)
|
if (BoolMonitor.Value)
|
||||||
|
{
|
||||||
|
WebInteraction.Inst.isWorkPlay = true;
|
||||||
WebInteraction.Inst.OpenTicket();
|
WebInteraction.Inst.OpenTicket();
|
||||||
|
}
|
||||||
CabinetUIManager.ChangeMenu(Menu.M_全景监控_现场作业);
|
CabinetUIManager.ChangeMenu(Menu.M_全景监控_现场作业);
|
||||||
break;
|
break;
|
||||||
case "Toggle_摄像头":
|
case "Toggle_摄像头":
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
http://7k3r7b.natappfree.cc/
|
|
@ -0,0 +1,7 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 3dac0c16bc6f647478b38c7a92153195
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
|
@ -4,6 +4,7 @@ using System;
|
||||||
using System.Collections;
|
using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Net.Http;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
@ -27,6 +28,8 @@ public class GameManager : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string token;
|
public string token;
|
||||||
|
|
||||||
|
string ct = null;
|
||||||
|
|
||||||
//[Header("机柜点位集合")]
|
//[Header("机柜点位集合")]
|
||||||
//public List<Transform> Cabinets_POS;
|
//public List<Transform> Cabinets_POS;
|
||||||
[Header("机柜区域集合")]
|
[Header("机柜区域集合")]
|
||||||
|
@ -107,56 +110,55 @@ public class GameManager : MonoBehaviour
|
||||||
_inst = this;
|
_inst = this;
|
||||||
DontDestroyOnLoad(this.gameObject);
|
DontDestroyOnLoad(this.gameObject);
|
||||||
}
|
}
|
||||||
Jk_URL = new webURL();
|
//StartCoroutine(LoadAddress());
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerator dsaklj()
|
public IEnumerator Init_StartCoroutine()
|
||||||
{
|
{
|
||||||
yield return StartCoroutine(LoadJSON(Application.streamingAssetsPath + "/设备查询.json"));
|
//yield return StartCoroutine(LoadJSON(Application.streamingAssetsPath + "/设备查询.json"));
|
||||||
|
yield return StartCoroutine(LoadAddress());
|
||||||
|
|
||||||
#region 正式
|
|
||||||
TransparentGlowManage.Inst.addScript();
|
|
||||||
|
|
||||||
if (root_AllDevice.data == null) yield break;
|
//#region 正式
|
||||||
|
//TransparentGlowManage.Inst.addScript();
|
||||||
|
|
||||||
#region 加载场景
|
//if (root_AllDevice.data == null) yield break;
|
||||||
Load_Device();
|
|
||||||
Load_Port();
|
|
||||||
Load_TmsAlarm();
|
|
||||||
Load_ENV();
|
|
||||||
|
|
||||||
#endregion
|
//#region 加载场景
|
||||||
|
//Load_Device();
|
||||||
|
//Load_Port();
|
||||||
|
//Load_TmsAlarm();
|
||||||
|
//Load_ENV();
|
||||||
|
|
||||||
#endregion
|
//#endregion
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
//加载完成
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private async void OnEnable()
|
private void OnEnable()
|
||||||
{
|
{
|
||||||
StartCoroutine(dsaklj());//测试
|
StartCoroutine(Init_StartCoroutine());
|
||||||
return;//测试
|
return;
|
||||||
|
//#region 正式
|
||||||
|
//TransparentGlowManage.Inst.addScript();
|
||||||
|
//await init_Device();
|
||||||
|
//await init_Port();
|
||||||
|
//await init_TmsAlarm();
|
||||||
|
//await init_ENV();
|
||||||
|
|
||||||
#region 正式
|
//if (root_AllDevice.data == null) return;
|
||||||
TransparentGlowManage.Inst.addScript();
|
|
||||||
await init_Device();
|
|
||||||
await init_Port();
|
|
||||||
await init_TmsAlarm();
|
|
||||||
await init_ENV();
|
|
||||||
|
|
||||||
if (root_AllDevice.data == null) return;
|
//#region 加载场景
|
||||||
|
//Load_Device();
|
||||||
|
//Load_Port();
|
||||||
|
//Load_TmsAlarm();
|
||||||
|
//Load_ENV();
|
||||||
|
|
||||||
#region 加载场景
|
//#endregion
|
||||||
Load_Device();
|
|
||||||
Load_Port();
|
|
||||||
Load_TmsAlarm();
|
|
||||||
Load_ENV();
|
|
||||||
|
|
||||||
#endregion
|
//#endregion
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
//加载完成
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -172,11 +174,11 @@ public class GameManager : MonoBehaviour
|
||||||
for (int i = 0; i < ENVs.Count; i++)
|
for (int i = 0; i < ENVs.Count; i++)
|
||||||
{
|
{
|
||||||
bool isFind = false;
|
bool isFind = false;
|
||||||
var pointDeviceId = ENVs[i].pointDeviceId;
|
var rackId = ENVs[i].rackId;
|
||||||
foreach (var item in Cabinets_go)
|
foreach (var item in Cabinets_go)
|
||||||
{
|
{
|
||||||
var D = item.GetComponent<DeviceQuery>().deviceList;
|
var D = item.GetComponent<DeviceQuery>().deviceList;
|
||||||
if (D.id == pointDeviceId)
|
if (D.id == rackId)
|
||||||
{
|
{
|
||||||
//温度
|
//温度
|
||||||
if (ENVs[i].pointType == "1")
|
if (ENVs[i].pointType == "1")
|
||||||
|
@ -196,7 +198,7 @@ public class GameManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
if (isFind) continue;
|
if (isFind) continue;
|
||||||
var machine_room = GameObject.Find("机房");
|
var machine_room = GameObject.Find("机房");
|
||||||
if (machine_room && pointDeviceId == machine_room.GetComponent<DeviceQuery>().deviceList.id)
|
if (machine_room && rackId == machine_room.GetComponent<DeviceQuery>().deviceList.id)
|
||||||
{
|
{
|
||||||
//温度
|
//温度
|
||||||
if (ENVs[i].pointType == "1")
|
if (ENVs[i].pointType == "1")
|
||||||
|
@ -213,7 +215,7 @@ public class GameManager : MonoBehaviour
|
||||||
}
|
}
|
||||||
if (isFind) continue;
|
if (isFind) continue;
|
||||||
var accumulator_room = GameObject.Find("蓄电池室");
|
var accumulator_room = GameObject.Find("蓄电池室");
|
||||||
if (accumulator_room && pointDeviceId == accumulator_room.GetComponent<DeviceQuery>().deviceList.id)
|
if (accumulator_room && rackId == accumulator_room.GetComponent<DeviceQuery>().deviceList.id)
|
||||||
{
|
{
|
||||||
//温度
|
//温度
|
||||||
if (ENVs[i].pointType == "1")
|
if (ENVs[i].pointType == "1")
|
||||||
|
@ -603,7 +605,7 @@ public class GameManager : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task init_Device()
|
public async Task<IEnumerator> init_Device()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < Racks_go.Count; i++)
|
for (int i = 0; i < Racks_go.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -633,13 +635,14 @@ public class GameManager : MonoBehaviour
|
||||||
|
|
||||||
root_AllDevice = JsonConvert.DeserializeObject<DeviceQuery.Root>(jsonResult);
|
root_AllDevice = JsonConvert.DeserializeObject<DeviceQuery.Root>(jsonResult);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询所有端口
|
/// 查询所有端口
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task init_Port()
|
public async Task<IEnumerator> init_Port()
|
||||||
{
|
{
|
||||||
for (int i = 0; i < TmsPorts_go.Count; i++)
|
for (int i = 0; i < TmsPorts_go.Count; i++)
|
||||||
{
|
{
|
||||||
|
@ -652,26 +655,31 @@ public class GameManager : MonoBehaviour
|
||||||
var jsonResult1 = await CombineJSON.GetJson_POST(Jk_URL.dk_cx, token);
|
var jsonResult1 = await CombineJSON.GetJson_POST(Jk_URL.dk_cx, token);
|
||||||
|
|
||||||
root_AllPort = JsonConvert.DeserializeObject<PortQuery.Root>(jsonResult1);
|
root_AllPort = JsonConvert.DeserializeObject<PortQuery.Root>(jsonResult1);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询所有环境
|
/// 查询所有环境
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task init_ENV()
|
public async Task<IEnumerator> init_ENV()
|
||||||
{
|
{
|
||||||
|
|
||||||
ENVs.Clear();
|
ENVs.Clear();
|
||||||
|
|
||||||
var jsonResult2 = await CombineJSON.GetJson_POST(Jk_URL.hj_cx, token);
|
var jsonResult2 = await CombineJSON.GetJson_POST(Jk_URL.hj_cx, token);
|
||||||
|
|
||||||
root_AllENV = JsonConvert.DeserializeObject<ENVQuery.Root>(jsonResult2);
|
root_AllENV = JsonConvert.DeserializeObject<ENVQuery.Root>(jsonResult2);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 查询所有告警
|
/// 查询所有告警
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task init_TmsAlarm()
|
public async Task<IEnumerator> init_TmsAlarm()
|
||||||
{
|
{
|
||||||
Array.ForEach(GameObject.FindObjectsOfType<TmsAlarmQuery>(), itme =>
|
Array.ForEach(GameObject.FindObjectsOfType<TmsAlarmQuery>(), itme =>
|
||||||
{
|
{
|
||||||
|
@ -683,6 +691,8 @@ public class GameManager : MonoBehaviour
|
||||||
var jsonResult3 = await CombineJSON.GetJson_POST(Jk_URL.gj_cx, token);
|
var jsonResult3 = await CombineJSON.GetJson_POST(Jk_URL.gj_cx, token);
|
||||||
|
|
||||||
root_AllAlarm = JsonConvert.DeserializeObject<TmsAlarmQuery.Root>(jsonResult3);
|
root_AllAlarm = JsonConvert.DeserializeObject<TmsAlarmQuery.Root>(jsonResult3);
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -1280,11 +1290,66 @@ public class GameManager : MonoBehaviour
|
||||||
return (d != null && d.deviceList.type == "1");
|
return (d != null && d.deviceList.type == "1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 读取地址
|
||||||
|
public IEnumerator LoadAddress()
|
||||||
|
{
|
||||||
|
string filePath = Application.streamingAssetsPath + "/dz.txt";
|
||||||
|
|
||||||
|
UnityWebRequest www = UnityWebRequest.Get(filePath);
|
||||||
|
yield return www.SendWebRequest();
|
||||||
|
|
||||||
|
if (www.result == UnityWebRequest.Result.Success)
|
||||||
|
{
|
||||||
|
string fileContent = www.downloadHandler.text;
|
||||||
|
Debug.Log("获取穿透成功:" + fileContent);
|
||||||
|
|
||||||
|
if (string.IsNullOrEmpty(fileContent))
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
Jk_URL = new webURL(fileContent);
|
||||||
|
|
||||||
|
//yield return StartCoroutine(Initialize());
|
||||||
|
bool initializeComplete = false;
|
||||||
|
StartCoroutine(Initialize(() => initializeComplete = true));
|
||||||
|
|
||||||
|
yield return new WaitUntil(() => initializeComplete);
|
||||||
|
|
||||||
|
if (root_AllDevice.data == null)
|
||||||
|
yield break;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LoadScene();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Debug.LogError("Error: " + www.error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取接口信息
|
||||||
|
private IEnumerator Initialize(Action onInitialized)
|
||||||
|
{
|
||||||
|
TransparentGlowManage.Inst.addScript();
|
||||||
|
|
||||||
|
TransparentGlowManage.Inst.addScript();
|
||||||
|
yield return init_Device();
|
||||||
|
yield return init_Port();
|
||||||
|
yield return init_TmsAlarm();
|
||||||
|
yield return init_ENV();
|
||||||
|
yield return new WaitForSeconds(1);
|
||||||
|
onInitialized.Invoke();
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载场景
|
||||||
|
private void LoadScene()
|
||||||
|
{
|
||||||
|
// 加载场景
|
||||||
|
Load_Device();
|
||||||
|
Load_Port();
|
||||||
|
Load_TmsAlarm();
|
||||||
|
Load_ENV();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1347,9 +1412,9 @@ public class GameManager : MonoBehaviour
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Header("检修票-查询URL")] public string jxp_cx;
|
[Header("检修票-查询URL")] public string jxp_cx;
|
||||||
|
|
||||||
public webURL()
|
public webURL(string ct)
|
||||||
{
|
{
|
||||||
string ct = "http://fpt9gx.natappfree.cc/";
|
//string ct = "http://fpt9gx.natappfree.cc/";
|
||||||
sb_cx = ct + "machineRoom/device/queryList";
|
sb_cx = ct + "machineRoom/device/queryList";
|
||||||
sb_xz = ct + "machineRoom/device/save";
|
sb_xz = ct + "machineRoom/device/save";
|
||||||
sb_sc = ct + "machineRoom/device/delete";
|
sb_sc = ct + "machineRoom/device/delete";
|
||||||
|
|
|
@ -12,9 +12,21 @@ public class WebInteraction : MonoBehaviour
|
||||||
|
|
||||||
public string current_videoNumber = null;
|
public string current_videoNumber = null;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 视频监控是否为打开状态
|
||||||
|
/// </summary>
|
||||||
|
public bool isVideoPlay = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 工作票是否为打开状态
|
||||||
|
/// </summary>
|
||||||
|
public bool isWorkPlay = false;
|
||||||
|
|
||||||
|
public GameManager gameManager;
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
{
|
{
|
||||||
Inst = this;
|
Inst = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
|
@ -34,7 +46,8 @@ public class WebInteraction : MonoBehaviour
|
||||||
/// <param name="token"></param>
|
/// <param name="token"></param>
|
||||||
public void unity_token_value(string token)
|
public void unity_token_value(string token)
|
||||||
{
|
{
|
||||||
GameManager.Inst.token = token;
|
gameManager.token = token;
|
||||||
|
gameManager.enabled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,6 +74,7 @@ public class WebInteraction : MonoBehaviour
|
||||||
{
|
{
|
||||||
// 在此处处理关闭视频监控的逻辑
|
// 在此处处理关闭视频监控的逻辑
|
||||||
Debug.Log("Closing video number: " + videoNumber);
|
Debug.Log("Closing video number: " + videoNumber);
|
||||||
|
isVideoPlay= false;
|
||||||
Application.ExternalCall("web_video_close", videoNumber);
|
Application.ExternalCall("web_video_close", videoNumber);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,10 @@ public class ENVQuery : MonoBehaviour
|
||||||
/// µ±Ç°×´Ì¬(²É¼¯½á¹û)
|
/// µ±Ç°×´Ì¬(²É¼¯½á¹û)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Tooltip("µ±Ç°×´Ì¬(²É¼¯½á¹û)")] public string collectResult;
|
[Tooltip("µ±Ç°×´Ì¬(²É¼¯½á¹û)")] public string collectResult;
|
||||||
|
/// <summary>
|
||||||
|
/// 机柜id
|
||||||
|
/// </summary>
|
||||||
|
[Tooltip("机柜id")] public string rackId;
|
||||||
}
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
|
|
|
@ -19,11 +19,20 @@ public class LensUI : CabinetUIBase
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
Camera = UnityEngine.Camera.main.transform;
|
Camera = UnityEngine.Camera.main.transform;
|
||||||
button.onClick.AddListener(() =>
|
button.onClick.AddListener(() =>
|
||||||
{
|
{
|
||||||
var t = text.text.Replace("ÉãÏñ", "");
|
var t = text.text.Replace("ÉãÏñ", "");
|
||||||
if (BoolMonitor.Value)
|
if (BoolMonitor.Value)
|
||||||
|
{
|
||||||
|
t = WebInteraction.Inst.current_videoNumber;
|
||||||
|
WebInteraction.Inst.isVideoPlay = true;
|
||||||
WebInteraction.Inst.OpenVideo(t);
|
WebInteraction.Inst.OpenVideo(t);
|
||||||
|
|
||||||
|
float x = Input.mousePosition.x;
|
||||||
|
float y = Screen.height - Input.mousePosition.y;
|
||||||
|
|
||||||
|
WebInteraction.Inst.SendVideoPosition(x, y);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,9 +62,8 @@ public class ExtendedFlycam : MonoBehaviour
|
||||||
Debug.Log("当前bool" + BoolMonitor.Value);
|
Debug.Log("当前bool" + BoolMonitor.Value);
|
||||||
if (!BoolMonitor.Value)
|
if (!BoolMonitor.Value)
|
||||||
{
|
{
|
||||||
if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber))
|
if (!string.IsNullOrEmpty(WebInteraction.Inst.current_videoNumber) && WebInteraction.Inst.isVideoPlay)
|
||||||
WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber);
|
WebInteraction.Inst.CloseVideo(WebInteraction.Inst.current_videoNumber);
|
||||||
WebInteraction.Inst.CloseTicket();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1 @@
|
||||||
|
http://7k3r7b.natappfree.cc/
|
Loading…
Reference in New Issue