UnitComponentSystem.cs 816 B

1234567891011121314151617181920212223242526272829303132333435
  1. namespace ET
  2. {
  3. public class UnitComponentAwakeSystem: AwakeSystem<UnitComponent>
  4. {
  5. public override void Awake(UnitComponent self)
  6. {
  7. }
  8. }
  9. public class UnitComponentDestroySystem: DestroySystem<UnitComponent>
  10. {
  11. public override void Destroy(UnitComponent self)
  12. {
  13. }
  14. }
  15. public static class UnitComponentSystem
  16. {
  17. public static void Add(this UnitComponent self, Unit unit)
  18. {
  19. }
  20. public static Unit Get(this UnitComponent self, long id)
  21. {
  22. Unit unit = self.GetChild<Unit>(id);
  23. return unit;
  24. }
  25. public static void Remove(this UnitComponent self, long id)
  26. {
  27. Unit unit = self.GetChild<Unit>(id);
  28. unit?.Dispose();
  29. }
  30. }
  31. }