标签:style blog color div log amp sp on res
UICamera.cs
修改前:
if ((!isPressed) && highlightChanged) { currentScheme = ControlScheme.Mouse; mTooltipTime = RealTime.time + tooltipDelay; mHover = mMouse[0].current; Notify(mHover, "OnHover", true); }
修改后:
if ((!isPressed || isPressed) && highlightChanged) { currentScheme = ControlScheme.Mouse; mTooltipTime = RealTime.time + tooltipDelay; mHover = mMouse[0].current; Notify(mHover, "OnHover", true); }
或者加一个
if (Input.GetMouseButton(0) && highlightChanged) { currentScheme = ControlScheme.Mouse; mTooltipTime = RealTime.time + tooltipDelay; mHover = mMouse[0].current; Notify(mHover, "OnHover", true); }
if ((justPressed || !isPressed) && mHover != null && highlightChanged) { currentScheme = ControlScheme.Mouse; if (mTooltip != null) ShowTooltip(false); Notify(mHover, "OnHover", false); mHover = null; } if ((justPressed || Input.GetMouseButton(0)) && mHover != null && highlightChanged) { currentScheme = ControlScheme.Mouse; if (mTooltip != null) ShowTooltip(false); Notify(mHover, "OnHover", false); mHover = null; }
监听函数
void OnHover(bool state) { Debug.Log(state+"OnHover"+gameObject.name); }
标签:style blog color div log amp sp on res
原文地址:http://www.cnblogs.com/123ing/p/3931679.html