using System; using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using DG.Tweening; using System.Threading.Tasks; public class TaskPanel : Base { public static TaskPanel instance; public List taskId = new List(); public Transform contentTrans; public GameObject taskPrefab; public JSONReader JSONReader; public Dictionary taskDic = new Dictionary(); public RectTransform buttonRect; // 你的按钮 RectTransform public Button hideBtn; private bool isHidden = false; // 用来判断按钮是否已经隐藏 public float moveDuration = 0.5f; // 动画持续时间 public float hidePositionX = 125f; // 隐藏到右边的 X 坐标值,具体值根据屏幕大小调整 public float showPositionX = -198f; // 显示时按钮的 X 坐标值 public List