using Godot; public partial class ManualCollectionItem : Panel { // 采集相关参数 private const float COLLECTION_TIME = 1.0f; // 采集时间1秒 // 状态变量 private bool isCollecting = false; private float collectionProgress = 0.0f; private string itemId; private GameData.ItemData itemData; // UI组件引用 private TextureRect iconTexture; private Label nameLabel; private Label statusLabel; private ColorRect progressFill; // 进度条颜色 private Color defaultProgressColor = new Color(0.3f, 0.8f, 0.3f, 1.0f); // 绿色 private Color collectingProgressColor = new Color(1.0f, 0.8f, 0.3f, 1.0f); // 采集时的橙色 public override void _Ready() { // 获取UI组件引用 iconTexture = GetNode("MarginContainer/VBoxContainer/TopRow/IconTexture"); nameLabel = GetNode