|
- using System;
- using System.Collections.Generic;
- using SUISSEngine;
- using UnityEngine;
- using UnityEngine.EventSystems;
-
- public class CIGInput : IslandInput
- {
- protected override bool ShouldProcessInput()
- {
- return this.island != null && this.island.islandCamera.enabled && (this._activeMouse || this._activeTouches || !this.HasRaycastHit);
- }
-
- private bool HasRaycastHit
- {
- get
- {
- PointerEventData pointerEventData = new PointerEventData(this._eventSystem);
- pointerEventData.position = UnityEngine.Input.mousePosition;
- List<RaycastResult> list = new List<RaycastResult>();
- this._eventSystem.RaycastAll(pointerEventData, list);
- return list.Count > 0;
- }
- }
-
- [SerializeField]
- private EventSystem _eventSystem;
- }
|