using Godot; using System; using System.Collections.Generic; using System.Linq; using Babushka.scripts.CSharp.Common.WorldManagement; public partial class World : Node { public IReadOnlyDictionary SpawnPoints; public override void _EnterTree() { GD.Print("World Enter Tree"); // find all child nodes of type SpawnPoint SpawnPoints = FindChildren("*") .OfType() .Select(sp => new KeyValuePair(sp.spawnPointResource, sp)) .ToDictionary(); } }