Player.cs 491 B

123456789101112131415161718192021222324252627282930313233
  1. namespace ETModel
  2. {
  3. [ObjectSystem]
  4. public class PlayerSystem : AwakeSystem<Player, string>
  5. {
  6. public override void Awake(Player self, string a)
  7. {
  8. self.Awake(a);
  9. }
  10. }
  11. public sealed class Player : Entity
  12. {
  13. public string Account { get; private set; }
  14. public long UnitId { get; set; }
  15. public void Awake(string account)
  16. {
  17. this.Account = account;
  18. }
  19. public override void Dispose()
  20. {
  21. if (this.IsDisposed)
  22. {
  23. return;
  24. }
  25. base.Dispose();
  26. }
  27. }
  28. }