ActorLocationSenderSystem.cs 718 B

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace ET.Server
  3. {
  4. [ObjectSystem]
  5. public class ActorLocationSenderAwakeSystem: AwakeSystem<ActorLocationSender>
  6. {
  7. protected override void Awake(ActorLocationSender self)
  8. {
  9. self.LastSendOrRecvTime = TimeHelper.ServerNow();
  10. self.ActorId = 0;
  11. self.Error = 0;
  12. }
  13. }
  14. [ObjectSystem]
  15. public class ActorLocationSenderDestroySystem: DestroySystem<ActorLocationSender>
  16. {
  17. protected override void Destroy(ActorLocationSender self)
  18. {
  19. Log.Debug($"actor location remove: {self.Id}");
  20. self.LastSendOrRecvTime = 0;
  21. self.ActorId = 0;
  22. self.Error = 0;
  23. }
  24. }
  25. }