using Godot; using Godot.Collections; public class WorldView : Spatial { // ui elements // scene nodes // resources // exports [Export] public NodePath World; [Export] public Vector2 ViewCenterPlaneCoord; // signals // delegate void OnCoordClicked(Vector2 world_pos); // other members private World _world; // Called when the node enters the scene tree for the first time. public override void _Ready() { _world = GetNode(World); _world.Connect("OnTilesChanged", this, nameof(HandleWorldTileChange)); } public override void _Process(float delta) { } private void HandleWorldTileChange(Array removedChunkIndices, Array addedChunkIndices) { GD.Print("Removed Chunks " + removedChunkIndices.Count); GD.Print("Added Chunks " + addedChunkIndices.Count); } }