From e3d0be8eebdad1953c39d12008f54358f7e8b156 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E5=8F=B7=E6=95=AC?= <153802103@qq.com> Date: Mon, 9 Dec 2024 14:33:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9F=BF=E5=9C=BA=E5=BC=B9=E7=AA=97=E5=8A=A8?= =?UTF-8?q?=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Scripts/SnailHouse/Snailmove.cs | 2 +- .../Assets/Scripts/kuangChang10/KuangChang.cs | 16 ++++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/TheStrongestSnail/Assets/Scripts/SnailHouse/Snailmove.cs b/TheStrongestSnail/Assets/Scripts/SnailHouse/Snailmove.cs index d92ee22..df70ecf 100644 --- a/TheStrongestSnail/Assets/Scripts/SnailHouse/Snailmove.cs +++ b/TheStrongestSnail/Assets/Scripts/SnailHouse/Snailmove.cs @@ -11,7 +11,7 @@ public class Snailmove : MonoBehaviour private bool isMoving = false; // 是否在移动 public long id; - private void Start() + private void Start() { moveDirection=Vector3.right; diff --git a/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChang.cs b/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChang.cs index 463a48e..71c5e2e 100644 --- a/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChang.cs +++ b/TheStrongestSnail/Assets/Scripts/kuangChang10/KuangChang.cs @@ -4,7 +4,7 @@ using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; - +using DG.Tweening; public delegate void SetActiveDelegate(bool isActive); public class KuangChang : MonoBehaviour @@ -62,9 +62,19 @@ public class KuangChang : MonoBehaviour Userdata.text = queryUserVoluteCoinResponse.data.ToString(); // 返回主页按钮的点击事件 - ReturnButton.onClick.AddListener(() => { SceneManager.LoadScene(1); }); + ReturnButton.onClick.AddListener(() => + { + + ReturnButton.transform.DOScale(1.5f, 0.25f); + ReturnButton.transform.DOScale(1f, 0.25f); + Invoke("ToMain", 0.5f); + }); } + void ToMain() + { + SceneManager.LoadScene(1); + } public async void UpdateUserdata() { QueryUserVoluteCoinResponse queryUserVoluteCoinResponse = await queryUserVoluteCoin.QueryUserVoluteCoin(); @@ -76,6 +86,8 @@ public class KuangChang : MonoBehaviour if (kuanghcangPop != null) { kuanghcangPop.SetActive(isActive); + kuanghcangPop.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f); + kuanghcangPop.transform.DOScale(1f, 0.5f); } QueryUserVoluteCoinResponse queryUserVoluteCoinResponse = await queryUserVoluteCoin.QueryUserVoluteCoin(); Userdata.text = queryUserVoluteCoinResponse.data.ToString();