IClickBlocker.cs 839 B

123456789101112131415161718
  1. using UnityEngine;
  2. /// <summary>
  3. /// Interface for UI components that can block clicks from propagating to the game world.
  4. /// Components implementing this interface can register with the ClickManager to control
  5. /// when their UI elements should prevent map interaction.
  6. /// </summary>
  7. public interface IClickBlocker
  8. {
  9. /// <summary>
  10. /// Determines if the UI component is blocking clicks at the given screen position.
  11. /// This method should check if the click position is within the UI bounds and
  12. /// whether the UI is currently in a state that should block interaction.
  13. /// </summary>
  14. /// <param name="screenPosition">The screen position of the click in pixels</param>
  15. /// <returns>True if this UI component should block the click, false otherwise</returns>
  16. bool IsBlockingClick(Vector2 screenPosition);
  17. }