From e4c0491f53e3083eafbfe93542407708190a2d79 Mon Sep 17 00:00:00 2001 From: huyulong <1838407198@qq.com> Date: Mon, 9 Dec 2024 09:46:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=A0=8F=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xiaofang/Assets/Res/HYLUI/TaskPanel.cs | 4 +++- xiaofang/Assets/Scenes/Tmap 1.unity | 2 +- xiaofang/Assets/Script/npc/RecuseNpc.cs | 10 +++++++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/xiaofang/Assets/Res/HYLUI/TaskPanel.cs b/xiaofang/Assets/Res/HYLUI/TaskPanel.cs index 858231ab..9b84be7b 100644 --- a/xiaofang/Assets/Res/HYLUI/TaskPanel.cs +++ b/xiaofang/Assets/Res/HYLUI/TaskPanel.cs @@ -39,7 +39,7 @@ public class TaskPanel : Base instance = this; hideBtn.onClick.AddListener(OnClickHideButton); - + } @@ -50,12 +50,14 @@ public class TaskPanel : Base { // 恢复按钮到原位置 buttonRect.DOAnchorPosX(showPositionX, moveDuration).SetEase(Ease.InOutCubic); + hideBtn.transform.Rotate(0, 0, 180f); isHidden = false; // 更新状态为未隐藏 } else { // 隐藏按钮 buttonRect.DOAnchorPosX(hidePositionX, moveDuration).SetEase(Ease.InOutCubic); + hideBtn.transform.Rotate(0, 0, 180f); isHidden = true; // 更新状态为隐藏 } } diff --git a/xiaofang/Assets/Scenes/Tmap 1.unity b/xiaofang/Assets/Scenes/Tmap 1.unity index 263990f6..28999aeb 100644 --- a/xiaofang/Assets/Scenes/Tmap 1.unity +++ b/xiaofang/Assets/Scenes/Tmap 1.unity @@ -6865,7 +6865,7 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 1, y: 0.5} m_AnchorMax: {x: 1, y: 0.5} - m_AnchoredPosition: {x: -198, y: 24.961} + m_AnchoredPosition: {x: -198, y: 221} m_SizeDelta: {x: 405.7333, y: 341.73} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &814718672 diff --git a/xiaofang/Assets/Script/npc/RecuseNpc.cs b/xiaofang/Assets/Script/npc/RecuseNpc.cs index 44fae622..8fc5e324 100644 --- a/xiaofang/Assets/Script/npc/RecuseNpc.cs +++ b/xiaofang/Assets/Script/npc/RecuseNpc.cs @@ -12,6 +12,8 @@ public enum Npcstate public class RecuseNpc : MonoBehaviour { + public static RecuseNpc instance; + private Button recusebtn; private bool statebool = false; @@ -24,6 +26,7 @@ public class RecuseNpc : MonoBehaviour public Transform target; private void Awake() { + instance = this; recusebtn = GameObject.Find("Canvas/Recuse").GetComponent