Просмотр исходного кода

修改文件命名 (#566)

ClientSenderComponent 少写了个 o
91焦先生 1 год назад
Родитель
Сommit
53980393db

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/AI/AI_Attack.cs

@@ -23,7 +23,7 @@ namespace ET.Client
             }
 
             // 停在当前位置
-            fiber.Root.GetComponent<ClientSenderCompnent>().Send(C2M_Stop.Create());
+            fiber.Root.GetComponent<ClientSenderComponent>().Send(C2M_Stop.Create());
             
             Log.Debug("开始攻击");
 

+ 9 - 9
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/ClientSenderCompnentSystem.cs → Unity/Assets/Scripts/Hotfix/Client/Demo/Main/ClientSenderComponentSystem.cs

@@ -2,23 +2,23 @@
 
 namespace ET.Client
 {
-    [EntitySystemOf(typeof(ClientSenderCompnent))]
-    [FriendOf(typeof(ClientSenderCompnent))]
-    public static partial class ClientSenderCompnentSystem
+    [EntitySystemOf(typeof(ClientSenderComponent))]
+    [FriendOf(typeof(ClientSenderComponent))]
+    public static partial class ClientSenderComponentSystem
     {
         [EntitySystem]
-        private static void Awake(this ClientSenderCompnent self)
+        private static void Awake(this ClientSenderComponent self)
         {
 
         }
         
         [EntitySystem]
-        private static void Destroy(this ClientSenderCompnent self)
+        private static void Destroy(this ClientSenderComponent self)
         {
             self.RemoveFiberAsync().Coroutine();
         }
 
-        private static async ETTask RemoveFiberAsync(this ClientSenderCompnent self)
+        private static async ETTask RemoveFiberAsync(this ClientSenderComponent self)
         {
             if (self.fiberId == 0)
             {
@@ -30,7 +30,7 @@ namespace ET.Client
             await FiberManager.Instance.Remove(fiberId);
         }
 
-        public static async ETTask<long> LoginAsync(this ClientSenderCompnent self, string account, string password)
+        public static async ETTask<long> LoginAsync(this ClientSenderComponent self, string account, string password)
         {
             self.fiberId = await FiberManager.Instance.Create(SchedulerType.ThreadPool, 0, SceneType.NetClient, "");
             self.netClientActorId = new ActorId(self.Fiber().Process, self.fiberId);
@@ -43,14 +43,14 @@ namespace ET.Client
             return response.PlayerId;
         }
 
-        public static void Send(this ClientSenderCompnent self, IMessage message)
+        public static void Send(this ClientSenderComponent self, IMessage message)
         {
             A2NetClient_Message a2NetClientMessage = A2NetClient_Message.Create();
             a2NetClientMessage.MessageObject = message;
             self.Root().GetComponent<ProcessInnerSender>().Send(self.netClientActorId, a2NetClientMessage);
         }
 
-        public static async ETTask<IResponse> Call(this ClientSenderCompnent self, IRequest request, bool needException = true)
+        public static async ETTask<IResponse> Call(this ClientSenderComponent self, IRequest request, bool needException = true)
         {
             A2NetClient_Request a2NetClientRequest = A2NetClient_Request.Create();
             a2NetClientRequest.MessageObject = request;

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Login/EnterMapHelper.cs

@@ -9,7 +9,7 @@ namespace ET.Client
         {
             try
             {
-                G2C_EnterMap g2CEnterMap = await root.GetComponent<ClientSenderCompnent>().Call(C2G_EnterMap.Create()) as G2C_EnterMap;
+                G2C_EnterMap g2CEnterMap = await root.GetComponent<ClientSenderComponent>().Call(C2G_EnterMap.Create()) as G2C_EnterMap;
                 
                 // 等待场景切换完成
                 await root.GetComponent<ObjectWait>().Wait<Wait_SceneChangeFinish>();
@@ -26,7 +26,7 @@ namespace ET.Client
         {
             try
             {
-                G2C_Match g2CEnterMap = await fiber.Root.GetComponent<ClientSenderCompnent>().Call(C2G_Match.Create()) as G2C_Match;
+                G2C_Match g2CEnterMap = await fiber.Root.GetComponent<ClientSenderComponent>().Call(C2G_Match.Create()) as G2C_Match;
             }
             catch (Exception e)
             {

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/Demo/Main/Move/MoveHelper.cs

@@ -11,7 +11,7 @@ namespace ET.Client
         {
             C2M_PathfindingResult msg = C2M_PathfindingResult.Create();
             msg.Position = targetPos;
-            unit.Root().GetComponent<ClientSenderCompnent>().Send(msg);
+            unit.Root().GetComponent<ClientSenderComponent>().Send(msg);
 
             ObjectWait objectWait = unit.GetComponent<ObjectWait>();
             

+ 3 - 3
Unity/Assets/Scripts/Hotfix/Client/Demo/NetClient/LoginHelper.cs

@@ -4,10 +4,10 @@ namespace ET.Client
     {
         public static async ETTask Login(Scene root, string account, string password)
         {
-            root.RemoveComponent<ClientSenderCompnent>();
-            ClientSenderCompnent clientSenderCompnent = root.AddComponent<ClientSenderCompnent>();
+            root.RemoveComponent<ClientSenderComponent>();
+            ClientSenderComponent clientSenderComponent = root.AddComponent<ClientSenderComponent>();
 
-            long playerId = await clientSenderCompnent.LoginAsync(account, password);
+            long playerId = await clientSenderComponent.LoginAsync(account, password);
 
             root.GetComponent<PlayerComponent>().MyId = playerId;
             

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientHelper.cs

@@ -65,7 +65,7 @@ namespace ET.Client
             C2Room_CheckHash c2RoomCheckHash = C2Room_CheckHash.Create();
             c2RoomCheckHash.Frame = frame;
             c2RoomCheckHash.Hash = hash;
-            self.Root().GetComponent<ClientSenderCompnent>().Send(c2RoomCheckHash);
+            self.Root().GetComponent<ClientSenderComponent>().Send(c2RoomCheckHash);
         }
         
         // 重新调整预测消息,只需要调整其他玩家的输入

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientUpdaterSystem.cs

@@ -46,7 +46,7 @@ namespace ET.Client
                 FrameMessage frameMessage = FrameMessage.Create();
                 frameMessage.Frame = room.PredictionFrame;
                 frameMessage.Input = self.Input;
-                root.GetComponent<ClientSenderCompnent>().Send(frameMessage);
+                root.GetComponent<ClientSenderComponent>().Send(frameMessage);
                 
                 long timeNow2 = TimeInfo.Instance.ServerNow();
                 if (timeNow2 - timeNow > 5)

+ 1 - 1
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSSceneChangeHelper.cs

@@ -14,7 +14,7 @@ namespace ET.Client
             // 等待表现层订阅的事件完成
             await EventSystem.Instance.PublishAsync(root, new LSSceneChangeStart() {Room = room});
 
-            root.GetComponent<ClientSenderCompnent>().Send(C2Room_ChangeSceneFinish.Create());
+            root.GetComponent<ClientSenderComponent>().Send(C2Room_ChangeSceneFinish.Create());
             
             // 等待Room2C_EnterMap消息
             WaitType.Wait_Room2C_Start waitRoom2CStart = await root.GetComponent<ObjectWait>().Wait<WaitType.Wait_Room2C_Start>();

+ 1 - 1
Unity/Assets/Scripts/Model/Client/Demo/Main/ClientSenderCompnent.cs → Unity/Assets/Scripts/Model/Client/Demo/Main/ClientSenderComponent.cs

@@ -1,7 +1,7 @@
 namespace ET.Client
 {
     [ComponentOf(typeof(Scene))]
-    public class ClientSenderCompnent: Entity, IAwake, IDestroy
+    public class ClientSenderComponent: Entity, IAwake, IDestroy
     {
         public int fiberId;