using Godot; using System.Diagnostics; using System.Linq; using Array = Godot.Collections.Array; public class Game : Spatial { // ui elements private Label _framesPerSecondLabel; private Label _centerLabel; private Label _tileOffsetLabel; private Label _numTilesLabel; private Label _mouseWorldLabel; private Label _mouseTileOffsetLabel; private Label _mouseTileCubeLabel; private Label _numCoordsAddedLabel; private Label _numCoordsRemovedLabel; private TextureRect _worldTextureRect; private TextureRect _heightTextureRect; private Button _generateWorldButton; private Control _gameUi; private Label _goldCountLabel; // scene nodes private Spatial _tileHighlight; private Spatial _mouseTileHighlight; private StreamContainer _streamContainer; private Area _streamContainerArea; private Spatial _streamContainerActiveTiles; private Player _player; private TileWorld _tileWorld; private Camera _camera; // Resources private PackedScene _tileHighlightScene; private ShaderMaterial _tileMaterial; // other members private HexGrid _hexGrid; private HexCell _lastTile; private HexCell _currentTile; private Vector3 _cameraOffset; private ImageTexture _blackWhitePatternTexture; private InteractionSystem _interactionSystem; // 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