Browse Source

修改Coroutine、Instantiat、CommandSystem

蓝色星空 1 year ago
parent
commit
9e203db0f8

+ 1 - 1
Assets/Scripts/Blue/0.FrameworkDesign/Core/AbstractArchitecture.cs

@@ -15,7 +15,7 @@ namespace Blue
         private IOCContainer serviceContainer=new IOCContainer();
         private IOCContainer utilityContainer = new IOCContainer();
         private ITypeEventSystem eventSystem=new DefaultTypeEventSystem();
-        private ICommandHandler commandHandle=new DefaultCommandHandler();
+        private ICommandHandler commandHandle=new QueryDefault_Hand();
         private IQueryHandler queryHandler = new DefaultQueryHandler();
 
         /// <summary>

+ 8 - 0
Assets/Scripts/Blue/0.FrameworkDesign/Hand.meta

@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f97b2a2e9d3b4724e9a700e43f803b0e
+folderAsset: yes
+DefaultImporter:
+  externalObjects: {}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

+ 15 - 18
Assets/Scripts/Blue/0.FrameworkDesign/Command/DefaultCommandHandler.cs → Assets/Scripts/Blue/0.FrameworkDesign/Hand/QueryDefault_Hand.cs

@@ -1,18 +1,15 @@
-namespace Blue
-{
-    /// <summary>
-    /// 默认Command 处理类
-    /// </summary>
-    public class DefaultCommandHandler : ICommandHandler
-    {
-        public void ExcuteCommand(ICommand command)
-        {
-            command.OnExcute();
-        }
-
-        public void ExcuteCommand<T>() where T : ICommand, new()
-        {
-            ExcuteCommand(new T());
-        }
-    }
-}
+namespace Blue
+{
+    public class QueryDefault_Hand : ICommandHandler
+    {
+        public void ExcuteCommand(ICommand command)
+        {
+            command.OnExcute();
+        }
+
+        public void ExcuteCommand<T>() where T : ICommand, new()
+        {
+            ExcuteCommand(new T());
+        }
+    }
+}

+ 1 - 1
Assets/Scripts/Blue/0.FrameworkDesign/Command/DefaultCommandHandler.cs.meta → Assets/Scripts/Blue/0.FrameworkDesign/Hand/QueryDefault_Hand.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: b3d22e8c7927ea94ea756fbaf507eab4
+guid: f65ee8c3cb5750344add0dbe504ffe68
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2

+ 1 - 1
Assets/Scripts/Blue/System/CommandExtensionSystem.cs → Assets/Scripts/Blue/System/CommandSystem.cs

@@ -1,6 +1,6 @@
 using Blue;
 
-public class CommandExtensionSystem : SingletonMonobehaviour<CommandExtensionSystem>
+public class CommandSystem : SingletonMonobehaviour<CommandSystem>
 {
     /// <summary>
     /// 发送命令

+ 0 - 0
Assets/Scripts/Blue/System/CommandExtensionSystem.cs.meta → Assets/Scripts/Blue/System/CommandSystem.cs.meta


+ 2 - 2
Assets/Scripts/Blue/System/RootSystem.cs → Assets/Scripts/Blue/System/CoroutineSystem.cs

@@ -2,7 +2,7 @@ using System.Collections;
 using UnityEngine;
 using Blue;
 
-public class RootSystem : SingletonMonobehaviour<RootSystem>
+public class CoroutineSystem : SingletonMonobehaviour<CoroutineSystem>
 {
     /// <summary>
     /// 启动一个协程
@@ -19,4 +19,4 @@ public class RootSystem : SingletonMonobehaviour<RootSystem>
     {
         StopCoroutine(routine);
     }
-}
+}

+ 0 - 0
Assets/Scripts/Blue/System/RootSystem.cs.meta → Assets/Scripts/Blue/System/CoroutineSystem.cs.meta


+ 5 - 1
Assets/Scripts/Blue/System/InstantiateSystem.cs

@@ -21,12 +21,16 @@ public class InstantiateSystem : SingletonMonobehaviour<InstantiateSystem>
         {
             // 修改显示内容,并实例化到CenterCamera
             prefab.GetComponentInChildren<TextMeshProUGUI>().text = content;
+            /*
             GameObject CenterCamera = GameObject.Find("SDKSystem/NRCameraRig/CenterCamera");
             if(CenterCamera!=null)
                 Instantiate(prefab, CenterCamera.transform);
+            */
+            if (OpenXRCamera.Instance.head != null)
+                Instantiate(prefab, OpenXRCamera.Instance.head);
 
             // 关闭加载界面
-            if(objDic.TryGetValue("LoadingPanel(Clone)",out GameObject LoadingPanel))
+            if (objDic.TryGetValue("LoadingPanel(Clone)",out GameObject LoadingPanel))
             {
                 if (LoadingPanel.activeSelf)
                     LoadingPanel.SetActive(false);