Browse Source

上传下载移动场景Pos/Rot

蓝色星空 1 year ago
parent
commit
da4fa8139d

+ 0 - 8
Assets/Scripts/Blue/0.FrameworkDesign/Command/ICommandHandler.cs

@@ -1,8 +0,0 @@
-namespace Blue
-{
-    public interface ICommandHandler
-    {
-        void ExcuteCommand(ICommand command);
-        void ExcuteCommand<T>() where T:ICommand,new();
-    }
-}

+ 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 QueryDefault_Hand();
+        private IQueryCommandHandler commandHandle=new QueryDefault_Hand();
         private IQueryHandler queryHandler = new DefaultQueryHandler();
 
         /// <summary>

+ 8 - 0
Assets/Scripts/Blue/0.FrameworkDesign/Hand/IQueryCommandHandler.cs

@@ -0,0 +1,8 @@
+namespace Blue
+{
+    public interface IQueryCommandHandler
+    {
+        void ExcuteQueryCommand(ICommand command);
+        void ExcuteQueryCommand<T>() where T:ICommand,new();
+    }
+}

+ 0 - 0
Assets/Scripts/Blue/0.FrameworkDesign/Command/ICommandHandler.cs.meta → Assets/Scripts/Blue/0.FrameworkDesign/Hand/IQueryCommandHandler.cs.meta


+ 4 - 4
Assets/Scripts/Blue/0.FrameworkDesign/Hand/QueryDefault_Hand.cs

@@ -1,15 +1,15 @@
 namespace Blue
 {
-    public class QueryDefault_Hand : ICommandHandler
+    public class QueryDefault_Hand : IQueryCommandHandler
     {
-        public void ExcuteCommand(ICommand command)
+        public void ExcuteQueryCommand(ICommand command)
         {
             command.OnExcute();
         }
 
-        public void ExcuteCommand<T>() where T : ICommand, new()
+        public void ExcuteQueryCommand<T>() where T : ICommand, new()
         {
-            ExcuteCommand(new T());
+            ExcuteQueryCommand(new T());
         }
     }
 }

+ 4 - 4
Assets/Scripts/Blue/0.FrameworkDesign/Rule/ICanSendCommandExtension.cs

@@ -3,20 +3,20 @@ namespace Blue
 
     public static class ICanSendCommandExtension
     {
-        private static ICommandHandler _commandHandler;
+        private static IQueryCommandHandler _commandHandler;
 
-        public static void SetCommandHandler(ICommandHandler commandHandler)
+        public static void SetCommandHandler(IQueryCommandHandler commandHandler)
         {
             _commandHandler = commandHandler;
         }
 
         public static void SendCommand<T>(this ICanSendCommand self) where T : ICommand, new()
         {
-            _commandHandler.ExcuteCommand<T>();
+            _commandHandler.ExcuteQueryCommand<T>();
         }
         public static void SendCommand<T>(this ICanSendCommand self, T command) where T : ICommand
         {
-            _commandHandler.ExcuteCommand(command);
+            _commandHandler.ExcuteQueryCommand(command);
         }
     }
 }

+ 0 - 19
Assets/Scripts/Blue/Command/DownloadCommand.cs

@@ -1,19 +0,0 @@
-using Blue;
-
-/// <summary>
-/// 下载移动场景的Postion、Rotatiuon
-/// </summary>
-public class DownloadCommand : ICommand
-{
-    private string Url;
-    private int projectID;
-    public DownloadCommand(string Url ,int projectID)
-    {
-        this.Url = Url;
-        this.projectID = projectID;
-    }
-    public void OnExcute()
-    {
-        this.GetService<IUpOrDownloadService>().GetScenePosRot(Url,projectID);
-    }
-}

+ 22 - 0
Assets/Scripts/Blue/Command/PointPosRotDownloadCommand.cs

@@ -0,0 +1,22 @@
+using Blue;
+
+/// <summary>
+/// 下载移动场景的Pos、Rot
+/// </summary>
+public class PointPosRotDownloadCommand : ICommand
+{
+    private int sceneID;
+
+    /// <summary>
+    /// 获取移动场景的Pos、Rot命令
+    /// </summary>
+    /// <param name="projectID">场景ID</param>
+    public PointPosRotDownloadCommand(int sceneID)
+    {
+        this.sceneID = sceneID;
+    }
+    public void OnExcute()
+    {
+        this.GetService<IUpOrDownloadService>().GetScenePosRot(sceneID);
+    }
+}

+ 0 - 0
Assets/Scripts/Blue/Command/DownloadCommand.cs.meta → Assets/Scripts/Blue/Command/PointPosRotDownloadCommand.cs.meta


+ 3 - 3
Assets/Scripts/Blue/Command/UploadCommand.cs → Assets/Scripts/Blue/Command/PointPosRotUploadCommand.cs

@@ -1,13 +1,13 @@
 using Blue;
 
 /// <summary>
-/// 上传移动场景的Postion、Rotatiuon
+/// 涓婁紶绉诲姩鍦烘櫙鐨凱os銆丷ot
 /// </summary>
-public class UploadCommand : ICommand
+public class PointPosRotUploadCommand : ICommand
 {
     private string Url;
     private string JsonString;
-    public UploadCommand(string Url, string JsonString)
+    public PointPosRotUploadCommand(string Url, string JsonString)
     {
         this.Url = Url;
         this.JsonString = JsonString;

+ 1 - 1
Assets/Scripts/Blue/Command/UploadCommand.cs.meta → Assets/Scripts/Blue/Command/PointPosRotUploadCommand.cs.meta

@@ -1,5 +1,5 @@
 fileFormatVersion: 2
-guid: 668e8622b1bc6124bbb2c57872785f4d
+guid: cdd517f3f6caa8c4aaa1edc3f823ea2f
 MonoImporter:
   externalObjects: {}
   serializedVersion: 2