123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- using System;
- using PrivateMaidMode;
- using UnityEngine;
- [RequireComponent(typeof(CapsuleCollider))]
- public class PartColliderData : MonoBehaviour
- {
- public CapsuleCollider capsuleCollider
- {
- get
- {
- return base.GetComponent<CapsuleCollider>();
- }
- set
- {
- CapsuleCollider component = base.GetComponent<CapsuleCollider>();
- }
- }
- 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;
- }
|