YIUI3DDisplayClick.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. using System;
  2. using UnityEngine;
  3. using YIUIFramework;
  4. namespace ET.Client
  5. {
  6. public interface IYIUI3DDisplayClick
  7. {
  8. void OnClick(Entity self, UI3DDisplay display, GameObject target, GameObject root);
  9. }
  10. public interface IYIUI3DDisplayClick<in T1> : ISystemType, IYIUI3DDisplayClick
  11. {
  12. }
  13. [EntitySystem]
  14. public abstract class YIUI3DDisplayClickSystem<T1, T2, T3, T4> : SystemObject, IYIUI3DDisplayClick<T1>
  15. where T1 : Entity, IYIUIBind, IYIUIInitialize
  16. {
  17. Type ISystemType.Type()
  18. {
  19. return typeof(T1);
  20. }
  21. Type ISystemType.SystemType()
  22. {
  23. return typeof(IYIUI3DDisplayClick<T1>);
  24. }
  25. void IYIUI3DDisplayClick.OnClick(Entity self, UI3DDisplay display, GameObject target, GameObject root)
  26. {
  27. YIUI3DDisplayClick((T1)self, display, target, root);
  28. }
  29. protected abstract void YIUI3DDisplayClick(T1 self, UI3DDisplay display, GameObject target, GameObject root);
  30. }
  31. }