file refactor
This commit is contained in:
parent
da5a3e874b
commit
bffb012a26
175 changed files with 1086 additions and 1107 deletions
|
|
@ -1,24 +0,0 @@
|
|||
using Godot;
|
||||
using Newlon.Components.GUI.Seedpackets;
|
||||
|
||||
namespace Newlon.Components.GUI;
|
||||
|
||||
public partial class GridLoader : GridContainer
|
||||
{
|
||||
private const string PLANT_RESOURCE_PATH = "res://resources/plants/";
|
||||
private PackedScene _plantCard;
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
_plantCard = ResourceLoader.Load<PackedScene>("res://scenes/gui/seedpacket.tscn");
|
||||
|
||||
foreach(var resource in GameRegistry.GetPlants())
|
||||
{
|
||||
Seedpacket slot = _plantCard.Instantiate<Seedpacket>();
|
||||
AddChild(slot);
|
||||
|
||||
slot.SetResource(resource);
|
||||
slot.SetHandler(new ChoosableHandler(slot));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue