浏览代码

fixed tooltip file

/3.1
Alexandra Serralta 5 年前
当前提交
3956979c
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 10
      Assets/Scripts/UX/Tooltip.cs

10
Assets/Scripts/UX/Tooltip.cs


// Start is called before the first frame update
void Start()
{
_toolTipOffset = new Vector3(-50,100,0);
m_ToolTipOffset = new Vector3(-50,100,0);
if(_enteredButton){
m_Tooltip.transform.position = Input.mousePosition + _toolTipOffset;
if(m_EnteredButton){
m_Tooltip.transform.position = Input.mousePosition + m_ToolTipOffset;
}
}

_enteredButton = true;
m_EnteredButton = true;
if(!gameObject.GetComponent<Button>().interactable)
{
m_Tooltip.SetActive(true);

public void OnPointerExit(PointerEventData eventData)
{
_enteredButton = false;
m_EnteredButton = false;
m_Tooltip.SetActive(false);
}
}
正在加载...
取消
保存