You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
761 B

  1. using System;
  2. using System.Collections.Generic;
  3. using SUISSEngine;
  4. using UnityEngine;
  5. using UnityEngine.EventSystems;
  6. public class CIGInput : IslandInput
  7. {
  8. protected override bool ShouldProcessInput()
  9. {
  10. return this.island != null && this.island.islandCamera.enabled && (this._activeMouse || this._activeTouches || !this.HasRaycastHit);
  11. }
  12. private bool HasRaycastHit
  13. {
  14. get
  15. {
  16. PointerEventData pointerEventData = new PointerEventData(this._eventSystem);
  17. pointerEventData.position = UnityEngine.Input.mousePosition;
  18. List<RaycastResult> list = new List<RaycastResult>();
  19. this._eventSystem.RaycastAll(pointerEventData, list);
  20. return list.Count > 0;
  21. }
  22. }
  23. [SerializeField]
  24. private EventSystem _eventSystem;
  25. }