Ver Fonte

修复一些问题

“hujiajun” há 4 semanas atrás
pai
commit
39f4b8e265

+ 38 - 7
Assets/DeMaDataManager.cs

@@ -585,14 +585,45 @@ Debug.Log("msg error===>"+msg);
     public void GetGaoJingTaiZhang(Action<List<baojing>> callback)
     {
         List<baojing> bj = new List<baojing>();
-        for (var i=0;i<100;i++)
+        StartCoroutine(getAlarmledger(1,bj,callback));
+    }
+
+    IEnumerator getAlarmledger(int page, List<baojing> bj,Action<List<baojing>> callback)
+    {
+        JsonData datas =new JsonData();
+        datas["page"] = page;
+        datas["pageSize"] = 10;
+        JsonData d =new JsonData();
+        yield return  StartCoroutine(Post_Demo("/digital-twin/v1/device/alarmLedger",datas.ToJson(), (string msg) => {
+       
+             d =JsonMapper.ToObject(msg);
+
+                for (var i=0;i<d["data"]["list"].Count;i++)
+                {
+                    for (var j=0;j< d["data"]["list"][i]["alarmLocation"].Count;j++)
+                    {
+                        baojing b = new baojing();
+                        b.name = d["data"]["list"][i]["deviceName"].ToString();
+                        b.time = changedate( d["data"]["list"][i]["date"].ToString(),4);
+                        b.dev =  d["data"]["list"][i]["alarmLocation"][j].ToString();
+                        bj.Add(b);
+                    }
+                }
+        }));
+        while(d==null)
+        {
+            yield return null;
+        }
+        if((int.Parse(d["data"]["total"].ToString())/10+1)>page)
         {
-            baojing b = new baojing();
-            b.name = i.ToString();
-            b.time = DateTime.Now.ToString();
-            b.dev = i.ToString();
-            bj.Add(b);
+            page++;
+            yield return StartCoroutine(getAlarmledger(page,bj,callback));
+        }
+        else
+        {
+            callback.Invoke(bj);
+
         }
-        callback.Invoke(bj);
+           
     }
 }

+ 4 - 4
Assets/GameManager.cs

@@ -201,7 +201,7 @@ public class GameManager : MonoBehaviour
                 {
                     dlist[i].SetActive(TapName.园区总览==tapName);
                 }
-                        SimpleCameraController.smallclickct = 5;
+                        SimpleCameraController.smallclickct = 3;
             break;
             case GameObjectType.科技车间:
                 keji[0].SetActive(tapName == TapName.科技车间总览);
@@ -215,7 +215,7 @@ public class GameManager : MonoBehaviour
                         SimpleCameraController.smallclickct = 2;
                     }else
                     {
-                        SimpleCameraController.smallclickct = 5;
+                        SimpleCameraController.smallclickct = 3;
 
                     }
             break;
@@ -231,7 +231,7 @@ public class GameManager : MonoBehaviour
                         SimpleCameraController.smallclickct = 2;
                     }else
                     {
-                        SimpleCameraController.smallclickct = 5;
+                        SimpleCameraController.smallclickct = 3;
 
                     }
             break;
@@ -247,7 +247,7 @@ public class GameManager : MonoBehaviour
                         dlist[i].SetActive(false);
                     }
                 }
-                        SimpleCameraController.smallclickct = 5;
+                        SimpleCameraController.smallclickct = 3;
             break;
         }
         smp.initpos();

Diff do ficheiro suprimidas por serem muito extensas
+ 49 - 5
Assets/Scenes/16-9.unity


+ 3 - 3
Assets/Scenes/SimpleCameraController.cs

@@ -214,14 +214,14 @@ namespace UnityTemplateProjects
             // Hide and lock cursor when right mouse button pressed
             if (IsRightMouseButtonDown())
             {
-              //  boost=smallclickct;
+                boost=smallclickct;
                 //Cursor.lockState = CursorLockMode.Locked;
             }
 
             // Unlock and show cursor when right mouse button released
             if (IsRightMouseButtonUp())
             {
-               // boost=5;
+                boost=3;
                // Cursor.visible = true;
                // Cursor.lockState = CursorLockMode.None;
             }
@@ -279,7 +279,7 @@ namespace UnityTemplateProjects
 #if ENABLE_INPUT_SYSTEM
             return boostFactorAction.ReadValue<Vector2>().y * 0.01f;
 #else
-            return Input.mouseScrollDelta.y * 0.005f;
+            return Input.mouseScrollDelta.y * 0.02f;
 #endif
         }
         /// <summary>

+ 1 - 1
Assets/StreamingAssets/1.txt

@@ -1 +1 @@
-http://192.168.50.114:8888
+http://202.107.242.12:3008/api

BIN
DeMaDemo/DeMa/Build/DeMa.data.unityweb


BIN
DeMaDemo/DeMa/Build/DeMa.framework.js.unityweb


BIN
DeMaDemo/DeMa/Build/DeMa.symbols.json.unityweb


BIN
DeMaDemo/DeMa/Build/DeMa.wasm.unityweb


BIN
DeMaDemo/DeMa/德马大屏20241126 Build-1.zip


BIN
DeMaDemo/DeMa/德马大屏20241126-1.zip


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff