using System.Collections; using System.Collections.Generic; using UnityEngine; public class MouseCheck : MonoBehaviour { public static bool InOut() { if (!Application.isFocused) { return false; } if (_G.TOUCH || _G.Mobile) { return true; } if (Input.mousePosition.x <= 0 || Input.mousePosition.x >= Screen.width) { return false; } if (Input.mousePosition.y <= 0 || Input.mousePosition.y >= Screen.height) { return false; } return true; } public static bool MouseOn_BTN_Around(){ if (Input.mousePosition.x >= Screen.width*0.9f || Input.mousePosition.x <= (Screen.width-Screen.width*0.9f)*0.5f ) { return true; } if ( Input.mousePosition.y >= Screen.height*0.9f || Input.mousePosition.y <= (Screen.height-Screen.height*0.8f)*0.5f ) { return true; } return false; } }