ModelViewComponent.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using CommonLang;
  2. using UnityEngine;
  3. namespace ET.Client
  4. {
  5. [ComponentOf(typeof(Scene))]
  6. public class ModelViewComponent : Entity, IAwake, IDestroy
  7. {
  8. [StaticField]
  9. public static ModelViewComponent Instance;
  10. //当人数多起来后,是否隐藏了普通用户的名字
  11. public bool IsHideNormalName = false;
  12. }
  13. [FriendOf(typeof(ModelViewComponent))]
  14. public static class ModelViewComponentSystem
  15. {
  16. [ObjectSystem]
  17. public class ModelViewComponentAwakeSystem : AwakeSystem<ModelViewComponent>
  18. {
  19. protected override void Awake(ModelViewComponent self)
  20. {
  21. ModelViewComponent.Instance = self;
  22. }
  23. }
  24. [ObjectSystem]
  25. public class ModelViewComponentDestroySystem : DestroySystem<ModelViewComponent>
  26. {
  27. protected override void Destroy(ModelViewComponent self)
  28. {
  29. ModelViewComponent.Instance = null;
  30. }
  31. }
  32. }
  33. }