UnitComponentSystem.cs 398 B

123456789101112131415161718192021
  1. namespace ET
  2. {
  3. public static partial class UnitComponentSystem
  4. {
  5. public static void Add(this UnitComponent self, Unit unit)
  6. {
  7. }
  8. public static Unit Get(this UnitComponent self, long id)
  9. {
  10. Unit unit = self.GetChild<Unit>(id);
  11. return unit;
  12. }
  13. public static void Remove(this UnitComponent self, long id)
  14. {
  15. Unit unit = self.GetChild<Unit>(id);
  16. unit?.Dispose();
  17. }
  18. }
  19. }