DGJ hace 4 meses
padre
commit
ebe239745e

+ 1 - 1
Assets/FrameWork/ProjectManager/DaoHang/Item/TrackingTarget.prefab

@@ -81,7 +81,7 @@ MonoBehaviour:
   m_EditorClassIdentifier: 
   trackID: 19
   trackingIsLost: 0
-  m_debugView: 1
+  m_debugView: 0
   m_size: 0.17
 --- !u!114 &4483285202108273067
 MonoBehaviour:

+ 4 - 2
Assets/FrameWork/ProjectManager/Demo.prefab

@@ -2586,7 +2586,7 @@ RectTransform:
   m_GameObject: {fileID: 855691858741328281}
   m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
   m_LocalPosition: {x: 0, y: 0, z: 0}
-  m_LocalScale: {x: 0.5, y: 0.5, z: 0.5}
+  m_LocalScale: {x: 0.25, y: 0.25, z: 0.25}
   m_ConstrainProportionsScale: 0
   m_Children: []
   m_Father: {fileID: 6787450879839044863}
@@ -2595,7 +2595,7 @@ RectTransform:
   m_AnchorMin: {x: 0.5, y: 0.5}
   m_AnchorMax: {x: 0.5, y: 0.5}
   m_AnchoredPosition: {x: 0, y: 0}
-  m_SizeDelta: {x: 640, y: 480}
+  m_SizeDelta: {x: 1502, y: 1026}
   m_Pivot: {x: 0.5, y: 0.5}
 --- !u!222 &6783659518953683080
 CanvasRenderer:
@@ -23421,6 +23421,8 @@ MonoBehaviour:
   oscillateControl: {fileID: 1295080549555890603}
   aIDeviceAlarmControl: {fileID: 2402721296726661098}
   exitPanel: {fileID: 7761491450647817299}
+  oldTarkingId: -1
+  timers: 0
 --- !u!1 &8193897771092435816
 GameObject:
   m_ObjectHideFlags: 0

+ 8 - 8
Assets/HotUpdate/Scripts/Scripts/Project/DaoHang/Managers/BladeServerManager.cs

@@ -366,15 +366,15 @@ public class BladeServerManager : MonoSingleton<BladeServerManager>
 
     public void OnTrackingLost(TagTracking tracking)
     {
-        if (tracking.TrackId == 6 || tracking.TrackId == 15 || tracking.TrackId == 26)
-        {
-            if (ProjectALLStateManager.Instance.isAIDevice)
-            {
-                AIDeviceManager.Instance.DeviceIdExit(tracking.TrackId);
-            }
+        //if (tracking.TrackId == 6 || tracking.TrackId == 15 || tracking.TrackId == 26)
+        //{
+        //    if (ProjectALLStateManager.Instance.isAIDevice)
+        //    {
+        //        AIDeviceManager.Instance.DeviceIdExit(tracking.TrackId);
+        //    }
 
-            return;
-        }
+        //    return;
+        //}
 
     }
 

+ 40 - 10
Assets/HotUpdate/Scripts/Scripts/Project/Demo/AIDeviceManager.cs

@@ -18,8 +18,8 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
     private bool isnoise = false;
     private bool isoscillate = false;
 
-    private int oldTarkingId = -1;
-
+    public int oldTarkingId = -1;
+    public float timers = 0;
     private void OnEnable()
     {
         deviceSaoMiao.SetActive(true);
@@ -37,13 +37,14 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
     {
         if (ProjectALLStateManager.Instance != null)
             ProjectALLStateManager.Instance.isAIDevice = false;
-        oldTarkingId = -1;
-        ishumidity = false;
-        isnoise = false;
-        isoscillate = false;
+       // oldTarkingId = -1;
+        //ishumidity = false;
+        //isnoise = false;
+        //isoscillate = false;
 
-    }   
-        
+    }
+
+   
     private void Update()
     {
 #if UNITY_EDITOR
@@ -52,10 +53,39 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
             DeviceIdentification(6);
         }
 #endif
+        
+        timers += Time.deltaTime;
+
+        if (timers > 3&& oldTarkingId!=-1)
+        {
+            timers = 0;
+            switch (oldTarkingId)
+            {
+                case 26:
+                  if(ishumidity)
+                        DeviceIdExit(oldTarkingId);
+                    break;
+                case 15:
+                    //   isoscillate = false;
+                    if (isoscillate)
+                        DeviceIdExit(oldTarkingId);
+                   
+                    break;
+                case 6:
+                    // isnoise = false;
+                    if (isnoise)
+                        DeviceIdExit(oldTarkingId);
+                  
+                    break;
+                default:
+                    break;
+            }
+           
+        }
     }
     public void DeviceIdentification(int id)
     {
-
+        timers = 0;
         if (oldTarkingId == id)
             return;
 
@@ -246,7 +276,7 @@ public class AIDeviceManager : MonoSingleton<AIDeviceManager>
 
         // Http ÇëÇó¶ÔÓ¦²ÎÊý
     }
-
+    
     public void DeviceIdExit(int id)
     {
         if(oldTarkingId == id)

+ 1 - 1
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/Loom.cs

@@ -8,7 +8,7 @@ using System.Linq;
 public class Loom : MonoBehaviour
 {
 	public static int maxThreads = 8;
-	static int numThreads;
+	public static int numThreads;
 
 	private static Loom _current;
 	private int _count;

+ 15 - 14
Assets/HotUpdate/Scripts/Scripts/Project/XunJian/进入任务/RenWuTypeWindow.cs

@@ -78,27 +78,27 @@ public class RenWuTypeWindow : MonoBehaviour
             case 1:
                 this.GetComponent<RawImage>().texture = null;
 
-                if (dicDownloadTex.ContainsKey(data2.uuid))
+                //if (dicDownloadTex.ContainsKey(data2.uuid))
+                //{
+                //    Debug.Log(" ContainsKey uuid " + data2.uuid);
+                //    this.GetComponent<RawImage>().texture = dicDownloadTex[data2.uuid];
+                //    changebizhi(dicDownloadTex[data2.uuid]);
+                //}
+                //else
                 {
-                    Debug.Log(" ContainsKey uuid " + data2.uuid);
-                    this.GetComponent<RawImage>().texture = dicDownloadTex[data2.uuid];
-                    changebizhi(dicDownloadTex[data2.uuid]);
-                }
-                else
-                {
-                    dicDownloadTex.Add(data2.uuid, new Texture2D(1,1));
+                 //   dicDownloadTex.Add(data2.uuid, new Texture2D(1,1));
 
                     DownLoadXRManager.DownLoadForFilePath(data2, (string bytes) => {
 
                         Debug.Log("RoomFileMinio.Instance.bucket=End=0=>" + bytes);
-
+                        Debug.Log("DGJ ===> Room " + Loom.numThreads);
                         string localpath = bytes;
                         Loom.RunAsync(() =>
                         {
                             Debug.Log("RoomFileMinio.Instance.bucket=End=13=>");
                             Debug.Log("RoomFileMinio.Instance.bucket=End=1=>" + localpath);
 
-                           
+
                             _mat = GameUtility.zoomByteByOpenCV(localpath, 1, false, true);
 
                             Debug.Log("RoomFileMinio.Instance.bucket=End==2=>" + localpath);
@@ -109,18 +109,19 @@ public class RenWuTypeWindow : MonoBehaviour
                                     Destroy(tex);
                                 }
                                 tex = GameUtility.TextureByMat(_mat);
-                                Texture2D texture2D = GameUtility.TextureByMat(_mat);
+                              //  Texture2D texture2D = GameUtility.TextureByMat(_mat);
                                 this.GetComponent<RawImage>().texture = tex;
                                 Debug.Log(" RawImag uuid " + data2.uuid);
 
-                                dicDownloadTex[data2.uuid] = texture2D;
+                              //  dicDownloadTex[data2.uuid] = texture2D;
                                 changebizhi(tex);
-
+                                Debug.Log("DGJ ===> Loom.numThreads " + Loom.numThreads); 
+                                Loom.numThreads--;
 
                             });
                         });
 
-                    }, (float f) => { });
+                    }, (float f) => {  });
                 }
                 
                 break;