AccountInfoComponentSystem.cs 733 B

12345678910111213141516171819202122232425262728
  1. namespace ET
  2. {
  3. public class AccountInfoComponentDestroySystem : DestroySystem<AccountInfoComponent>
  4. {
  5. public override void Destroy(AccountInfoComponent self)
  6. {
  7. self.Clear();
  8. }
  9. }
  10. public static class AccountInfoComponentSystem
  11. {
  12. public static void Clear(this AccountInfoComponent self)
  13. {
  14. self.Token = string.Empty;
  15. self.AccountId = 0;
  16. self.RealmKey = string.Empty;
  17. self.RealmAddress = string.Empty;
  18. self.Age = 0;
  19. self.Account = string.Empty;
  20. }
  21. public static bool IsLogin(this AccountInfoComponent self)
  22. {
  23. return self.AccountId > 0;
  24. }
  25. }
  26. }