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

LSHelper改成LSClientHelper,放到Client中

tanghai 2 лет назад
Родитель
Сommit
6b5a17973e

+ 2 - 2
Unity/Assets/Scripts/Hotfix/Share/LockStep/LSHelper.cs → Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientHelper.cs

@@ -3,7 +3,7 @@ using ET.Client;
 
 namespace ET
 {
-    public static class LSHelper
+    public static class LSClientHelper
     {
         public static void RunRollbackSystem(Entity entity)
         {
@@ -50,7 +50,7 @@ namespace ET
             for (int i = room.AuthorityFrame + 1; i <= room.PredictionFrame; ++i)
             {
                 OneFrameInputs oneFrameInputs = frameBuffer.FrameInputs(i);
-                LSHelper.CopyOtherInputsTo(room, authorityFrameInput, oneFrameInputs); // 重新预测消息
+                LSClientHelper.CopyOtherInputsTo(room, authorityFrameInput, oneFrameInputs); // 重新预测消息
                 room.Update(oneFrameInputs);
             }
             

+ 11 - 0
Unity/Assets/Scripts/Hotfix/Client/LockStep/LSClientHelper.cs.meta

@@ -0,0 +1,11 @@
+fileFormatVersion: 2
+guid: 915aaa51beb994638bd10e0d2ed9d8a7
+MonoImporter:
+  externalObjects: {}
+  serializedVersion: 2
+  defaultReferences: []
+  executionOrder: 0
+  icon: {instanceID: 0}
+  userData: 
+  assetBundleName: 
+  assetBundleVariant: 

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

@@ -33,7 +33,7 @@ namespace ET.Client
                 {
                     input.CopyTo(predictionInput);
                     // 回滚到frameBuffer.AuthorityFrame
-                    LSHelper.Rollback(room, room.AuthorityFrame);
+                    LSClientHelper.Rollback(room, room.AuthorityFrame);
                 }
                 else
                 {

+ 0 - 3
Unity/Assets/Scripts/Hotfix/Share/LockStep/LSHelper.cs.meta

@@ -1,3 +0,0 @@
-fileFormatVersion: 2
-guid: 08b41d1bd6a844788442e24b957c784d
-timeCreated: 1682325680

+ 2 - 2
Unity/Assets/Scripts/HotfixView/Client/LockStep/UI/UILSRoom/UILSRoomComponentSystem.cs

@@ -68,13 +68,13 @@ namespace ET.Client
         {
             string name = self.saveName.text;
             
-            LSHelper.SaveReplay(self.Room(), name);
+            LSClientHelper.SaveReplay(self.Room(), name);
         }
         
         private static void JumpReplay(this UILSRoomComponent self)
         {
             int toFrame = int.Parse(self.jumpToField.text);
-            LSHelper.JumpReplay(self.Room(), toFrame);
+            LSClientHelper.JumpReplay(self.Room(), toFrame);
         }
         
         private static void OnReplaySpeedClicked(this UILSRoomComponent self)