Cute_demon_attacks/meng_yao/Assets/script/TanChuang/AchievementTanchuang.cs
2024-11-14 16:05:27 +08:00

46 lines
1.0 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using DG.Tweening;
public class AchievementTanchuang : MonoBehaviour
{
public GameObject AchievementPanel;
public Button AchievementBtn;
public RectTransform SettingRect;
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
void Start()
{
AchievementBtn.onClick.AddListener(Display_pop_up_window);
SettingRect = this.GetComponent<RectTransform>();
AchievementPanel.gameObject.SetActive(false);
}
private void Display_pop_up_window()
{
SettingRect.DOScale(Deflate, 0.3f).SetEase(Ease.OutBack);
StartCoroutine(Magnify(SettingRect));
AchievementPanel.gameObject.SetActive(true);
}
public void CloseClick()
{
AchievementPanel.gameObject.SetActive(false);
}
IEnumerator Magnify(RectTransform allpanel)
{
Debug.Log("Ö´Ðй«¸æµ¯´°Ð­³Ì");
allpanel.DOScale(Vector3.one, 0.8f).SetEase(Ease.OutBack);
yield return null;
}
}