Explorar o código

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

tanghai %!s(int64=4) %!d(string=hai) anos
pai
achega
ef9fee8e7a
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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
     {