SessionComponentSystem.cs 396 B

123456789101112131415161718
  1. namespace ET
  2. {
  3. public class SessionComponentDestroySystem: DestroySystem<SessionComponent>
  4. {
  5. public override void Destroy(SessionComponent self)
  6. {
  7. self.Session.Dispose();
  8. }
  9. }
  10. public static class SessionComponentComponent
  11. {
  12. public static void Disconnect(this SessionComponent self)
  13. {
  14. self.Session?.GetComponent<DisConnectedCompnent>()?.CancelAlert();
  15. }
  16. }
  17. }