2024-11-13 17:58:34 +08:00
|
|
|
|
using System.Collections;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using UnityEngine;
|
|
|
|
|
using UnityEngine.UI;
|
|
|
|
|
using DG.Tweening;
|
2024-11-14 16:05:27 +08:00
|
|
|
|
public class AchievementTanchuang : MonoBehaviour
|
2024-11-13 17:58:34 +08:00
|
|
|
|
{
|
2024-11-14 16:05:27 +08:00
|
|
|
|
public GameObject AchievementPanel;
|
|
|
|
|
public Button AchievementBtn;
|
|
|
|
|
|
2024-11-13 17:58:34 +08:00
|
|
|
|
public RectTransform SettingRect;
|
|
|
|
|
|
|
|
|
|
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Start()
|
|
|
|
|
{
|
|
|
|
|
|
2024-11-14 16:05:27 +08:00
|
|
|
|
AchievementBtn.onClick.AddListener(Display_pop_up_window);
|
2024-11-13 17:58:34 +08:00
|
|
|
|
SettingRect = this.GetComponent<RectTransform>();
|
2024-11-14 16:05:27 +08:00
|
|
|
|
AchievementPanel.gameObject.SetActive(false);
|
2024-11-13 17:58:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Display_pop_up_window()
|
|
|
|
|
{
|
|
|
|
|
SettingRect.DOScale(Deflate, 0.3f).SetEase(Ease.OutBack);
|
|
|
|
|
StartCoroutine(Magnify(SettingRect));
|
2024-11-14 16:05:27 +08:00
|
|
|
|
AchievementPanel.gameObject.SetActive(true);
|
2024-11-13 17:58:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void CloseClick()
|
|
|
|
|
{
|
2024-11-14 16:05:27 +08:00
|
|
|
|
AchievementPanel.gameObject.SetActive(false);
|
2024-11-13 17:58:34 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
IEnumerator Magnify(RectTransform allpanel)
|
|
|
|
|
{
|
|
|
|
|
Debug.Log("ִ<>й<EFBFBD><D0B9>浯<EFBFBD><E6B5AF>Э<EFBFBD><D0AD>");
|
2024-11-14 16:05:27 +08:00
|
|
|
|
allpanel.DOScale(Vector3.one, 0.8f).SetEase(Ease.OutBack);
|
2024-11-13 17:58:34 +08:00
|
|
|
|
yield return null;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|