using System.Diagnostics; using Godot; public class Game : Spatial { private enum ActionMode { Default, Building } private ActionMode _actionMode = ActionMode.Default; private ImageTexture _blackWhitePatternTexture; private Camera _camera; private Vector3 _cameraOffset; private Label _centerLabel; private HexCell _currentTile; // ui elements private Label _framesPerSecondLabel; private Control _gameUi; private Label _woodCountLabel; private Label _goldCountLabel; private TextureRect _heightTextureRect; private Button _walkActionButton; private Button _buildActionButton; // other members private HexGrid _hexGrid; private InteractionSystem _interactionSystem; private Label _mouseTileCubeLabel; private Label _mouseTileAxialLabel; private Spatial _mouseTileHighlight; private Label _mouseTileOffsetLabel; private Label _mouseWorldLabel; private Player _player; // scene nodes private Spatial _tileHighlight; // Resources private ShaderMaterial _tileMaterial; private Label _tileOffsetLabel; private World _world; private TextureRect _worldTextureRect; private readonly PackedScene _workbenchScene = GD.Load("res://entities/Workbench.tscn"); // Called when the node enters the scene tree for the first time. public override void _Ready() { // debugStatsContainer Container debugStatsContainer = (Container)FindNode("DebugStatsContainer"); _framesPerSecondLabel = debugStatsContainer.GetNode