33 lines
829 B
C#
33 lines
829 B
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
using UnityEngine.UI;
|
|
using DG.Tweening;
|
|
using UnityEngine.EventSystems;
|
|
|
|
namespace YHElectric
|
|
{
|
|
public class TopBarElement : MonoBehaviour
|
|
{
|
|
private Transform popUp;
|
|
public bool isShow = false;
|
|
void Start()
|
|
{
|
|
popUp = transform.Find("popUp");
|
|
}
|
|
public void Enter()
|
|
{
|
|
popUp.localScale = new Vector3(1, 0, 1);
|
|
popUp.gameObject.SetActive(true);
|
|
popUp.DOScaleY(1, 0.3f).SetEase(Ease.InOutSine);
|
|
}
|
|
public void Exit()
|
|
{
|
|
popUp.gameObject.transform.DOScaleY(0, 0.3f).SetEase(Ease.InOutSine).OnComplete(() =>
|
|
{
|
|
popUp.gameObject.SetActive(false);
|
|
});
|
|
}
|
|
}
|
|
}
|