using Godot; using System; using System.Collections.Generic; using System.Linq; public partial class ResourceLoader { public static PackedScene LoadLayerPrefab() { return GD.Load($"res://Prefabs/Layer.tscn"); } public static Dictionary LoadTiles() { Dictionary tileMeshes = new Dictionary(); PackedScene tileCollection = GD.Load($"res://Assets/Objects/Tiles.glb"); Node root = tileCollection.Instantiate(); foreach (MeshInstance3D child in root.GetChildren()) { tileMeshes.Add(child.Name.ToString().ToLower(), child); } return tileMeshes; } }