63 lines
1.2 KiB
C#
63 lines
1.2 KiB
C#
|
using System.Collections;
|
|||
|
using System.Collections.Generic;
|
|||
|
using UnityEngine;
|
|||
|
using UnityEngine.UI;
|
|||
|
using DG.Tweening;
|
|||
|
public class ZdTanchuang : MonoBehaviour
|
|||
|
{
|
|||
|
|
|||
|
public GameObject team;
|
|||
|
public Button Zdbtn;
|
|||
|
public Image hdtxbg;
|
|||
|
|
|||
|
public RectTransform ZdPanel;
|
|||
|
|
|||
|
Vector3 Deflate = new Vector3(0.5f, 0.5f, 0.5f);
|
|||
|
|
|||
|
public Sprite ZdglDownsp;
|
|||
|
public Sprite ZDglUpsp;
|
|||
|
|
|||
|
public Transform canvas;
|
|||
|
private void Awake()
|
|||
|
{
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void Start()
|
|||
|
{
|
|||
|
|
|||
|
Zdbtn.onClick.AddListener(Display_pop_up_window);
|
|||
|
ZdPanel = this.GetComponent<RectTransform>();
|
|||
|
team.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
private void Display_pop_up_window()
|
|||
|
{
|
|||
|
ZdPanel.DOScale(Deflate, 0.3f).SetEase(Ease.OutBack);
|
|||
|
hdtxbg.sprite = ZdglDownsp;
|
|||
|
StartCoroutine(Magnify(ZdPanel));
|
|||
|
|
|||
|
team.gameObject.SetActive(true);
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
public void CloseClick()
|
|||
|
{
|
|||
|
team.gameObject.SetActive(false);
|
|||
|
}
|
|||
|
|
|||
|
IEnumerator Magnify(RectTransform allpanel)
|
|||
|
{
|
|||
|
Debug.Log("ִ<>й<EFBFBD><D0B9>浯<EFBFBD><E6B5AF>Э<EFBFBD><D0AD>");
|
|||
|
allpanel.DOScale(Vector3.one, 0.8f).SetEase(Ease.OutBack).OnComplete(() =>
|
|||
|
{
|
|||
|
hdtxbg.sprite = ZDglUpsp;
|
|||
|
});
|
|||
|
|
|||
|
yield return null;
|
|||
|
|
|||
|
}
|
|||
|
}
|