using System; using PrivateMaidMode; using UnityEngine; [RequireComponent(typeof(CapsuleCollider))] public class PartColliderData : MonoBehaviour { public CapsuleCollider capsuleCollider { get { return base.GetComponent(); } set { CapsuleCollider component = base.GetComponent(); } } public static void SetDefaultCursor() { Cursor.SetCursor(null, Vector2.zero, CursorMode.ForceSoftware); } private void Awake() { this.cursorTexture = (Texture2D)Resources.Load("ScenePrivate/Textures/TouchCursor"); } private void OnDestroy() { this.SetHandCursor(false); } public void SetHandCursor(bool visible) { if (visible) { Cursor.SetCursor(this.cursorTexture, new Vector2((float)(this.cursorTexture.width / 2), (float)(this.cursorTexture.height / 2)), CursorMode.ForceSoftware); } else { PartColliderData.SetDefaultCursor(); } } private void OnMouseEnter() { if (UICamera.Raycast(Input.mousePosition)) { return; } if (this.canTouch) { this.SetHandCursor(true); this.isEnter = true; } } private void OnMouseExit() { if (this.isEnter) { this.SetHandCursor(false); } } private Texture2D cursorTexture; public bool canTouch; private bool isEnter; public TouchDataBase.TouchPoint point; }