Debug zombie spawner

This commit is contained in:
Rendo 2025-06-24 18:44:49 +05:00
commit 0fff33d196
69 changed files with 564 additions and 100 deletions

View file

@ -12,19 +12,13 @@ public partial class GridLoader : GridContainer
{
_plantCard = ResourceLoader.Load<PackedScene>("res://scenes/gui/seedpacket.tscn");
string[] files = DirAccess.GetFilesAt(PLANT_RESOURCE_PATH);
foreach(var file in files)
foreach(var resource in GameRegistry.GetPlants())
{
if(ResourceLoader.Exists(PLANT_RESOURCE_PATH+file))
{
Seedpacket slot = _plantCard.Instantiate<Seedpacket>();
AddChild(slot);
slot.SetPlantResource(ResourceLoader.Load<PlantResource>(PLANT_RESOURCE_PATH+file));
slot.SetHandler(new ChoosableHandler(slot));
}
Seedpacket slot = _plantCard.Instantiate<Seedpacket>();
AddChild(slot);
slot.SetPlantResource(resource);
slot.SetHandler(new ChoosableHandler(slot));
}
}
}