修改细节
This commit is contained in:
1 parent
9f19e951cc
commit
7a1042d184
14 files changed
+1889
-1314
No files matched your search
@@ -5,14 +5,21 @@ using UnityEngine;
|
||||
using UnityEngine.EventSystems;
|
||||
public class RaceMaskScript : MonoBehaviour, IPointerEnterHandler,IPointerExitHandler
|
||||
{
|
||||
float? localY = null;
|
||||
public void OnPointerEnter(PointerEventData eventData)
|
||||
{
|
||||
transform.Find("Panel").GetComponent<CanvasGroup>().DOFade(1, 0.5f);
|
||||
if (localY == null)
|
||||
{
|
||||
localY = transform.localPosition.y;
|
||||
}
|
||||
transform.DOLocalMoveY(localY.Value + 5, 0.3f);
|
||||
}
|
||||
|
||||
public void OnPointerExit(PointerEventData eventData)
|
||||
{
|
||||
transform.Find("Panel").GetComponent<CanvasGroup>().DOFade(0, 0.5f);
|
||||
transform.DOLocalMoveY(localY.Value, 0.3f);
|
||||
}
|
||||
|
||||
// Start is called before the first frame update
|
||||
|
||||
Reference in new issue
Block a user