using Godot; using System; using System.Collections.Generic; public partial class GameScene : Control { // 资源类型枚举 public enum ResourceType { IronOre, CopperOre, IronIngot, CopperIngot } // 资源数据结构 public class ResourceData { public string Name { get; set; } public int Amount { get; set; } public ResourceType Type { get; set; } public bool IsProcessed { get; set; } } // 电力系统数据 private float powerGeneration = 0; private float powerConsumption = 0; private float powerStorage = 0; private float powerDischarge = 0; // 库存数据(保留用于兼容性,但主要由InventoryManager管理) private Dictionary inventory = new Dictionary(); // UI引用 private Label powerGenerationLabel; private Label powerConsumptionLabel; private Label powerStorageLabel; private Label powerDischargeLabel; private TabContainer categoryTabs; private CraftingQueueManager craftingQueue; public override void _Ready() { GD.Print("GameScene _Ready 开始"); // 获取UI引用 powerGenerationLabel = GetNode