Debug zombie spawner
This commit is contained in:
parent
116ebff0c2
commit
0fff33d196
69 changed files with 564 additions and 100 deletions
|
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue