protected virtual void OnDisable() { GameManager.uiSendoUsadaEvent -= OnMouseExit; if (pointerIn) { CursorInfos.SetCursorBase(); } }
//[Header("Cursor Base")] //public Texture2D cursorImage; //[SerializeField] Vector2 offset = Vector2.zero; //[Header("Cursor Iterativo")] //public Texture2D select; //public CursorMode curmode = CursorMode.ForceSoftware; //public Vector2 hotspot = Vector2.zero; private void Awake() { #if UNITY_EDITOR if (instance != null) { Debug.Log("Tem mais de um CursorInfos"); } #endif instance = this; }
public virtual void OnPointerExit(PointerEventData eventData) { pointerIn = false; CursorInfos.SetCursorBase(); }
//Para UI. public virtual void OnPointerEnter(PointerEventData eventData) { pointerIn = true; CursorInfos.SetCursorInterativo(); }
protected virtual void MouseOut() { pointerIn = false; CursorInfos.SetCursorBase(); }
protected virtual void MouseIn() { pointerIn = true; CursorInfos.SetCursorInterativo(); }