PointEffectBase.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. using UnityEngine;
  2. using UnityEngine.EventSystems;
  3. namespace SC {
  4. public abstract class PointEffectBase : MonoBehaviour,
  5. IPointerDownHandler,
  6. IPointerUpHandler,
  7. IPointerClickHandler,
  8. IDragHandler,
  9. IPointerEnterHandler,
  10. IPointerExitHandler {
  11. public virtual void OnPointerClick( PointerEventData eventData ) { }
  12. public virtual void OnPointerEnter( PointerEventData eventData ) { }
  13. public virtual void OnPointerExit( PointerEventData eventData ) { }
  14. public virtual void OnPointerUp( PointerEventData eventData ) { }
  15. public virtual void OnPointerDown( PointerEventData eventData ) { }
  16. public virtual void OnDrag( PointerEventData eventData ) { }
  17. /// <summary>
  18. /// Click后半段
  19. /// </summary>
  20. /// <param name="eventData"></param>
  21. public virtual void ClickFinish() { }
  22. protected virtual void Awake() { }
  23. protected virtual void OnEnable() { }
  24. protected virtual void Start() { }
  25. protected virtual void Update() { }
  26. protected virtual void OnDisable() { }
  27. protected virtual void OnDestroy() { }
  28. }
  29. }