ソースを参照

TimerComponent加上LoadSystem,热重载重新加载Timer逻辑

tanghai 4 年 前
コミット
ef9fee8e7a
1 ファイル変更9 行追加0 行削除
  1. 9 0
      Unity/Codes/Model/Core/Timer/TimerComponent.cs

+ 9 - 0
Unity/Codes/Model/Core/Timer/TimerComponent.cs

@@ -63,6 +63,15 @@ namespace ET
             self.Update();
         }
     }
+    
+    [ObjectSystem]
+    public class TimerComponentLoadSystem: LoadSystem<TimerComponent>
+    {
+        public override void Load(TimerComponent self)
+        {
+            self.Awake();
+        }
+    }
 
     public class TimerComponent: Entity
     {