public static CommonItemDesView Open(ItemInfo data, Vector3 pos, Vector2 sizeDelta) { CommonItemDesView view = UIMgr.instance.Open <CommonItemDesView>(PREFAB_PATH, EUISortingLayer.Tips); view.SetData(data, pos, sizeDelta); return(view); }
public void OnPointerUp(PointerEventData eventData) { if (_type != ShowDescriptionType.click) { StopAllCoroutines(); if (_itemView != null) { _itemView.Close(); } _itemView = null; } }
private IEnumerator showTipsCoroutine(float delay) { Debugger.Log("itemid:" + _itemInfo.itemData.id); yield return(new WaitForSeconds(delay)); RectTransform rectTran = transform as RectTransform; Vector2 sizeDelta = new Vector2(100, 100); if (rectTran != null) { sizeDelta = (transform as RectTransform).sizeDelta; } _itemView = CommonItemDesView.Open(_itemInfo, transform.position, sizeDelta); }