You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
562 B
28 lines
562 B
11 months ago
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
using UnityEngine.EventSystems;
|
||
|
using DG.Tweening;
|
||
|
|
||
|
public class UIScaleController : MonoBehaviour,IPointerEnterHandler,IPointerExitHandler
|
||
|
{
|
||
|
public Vector3 Start;
|
||
|
public Vector3 End;
|
||
|
public float _time;
|
||
|
public GameObject Tag;
|
||
|
|
||
|
|
||
|
public void OnPointerEnter(PointerEventData eventData)
|
||
|
{
|
||
|
Tag.transform.DOScale(End, _time);
|
||
|
}
|
||
|
|
||
|
public void OnPointerExit(PointerEventData eventData)
|
||
|
{
|
||
|
Tag.transform.DOScale(Start, _time);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
}
|