This commit is contained in:
Фёдор Веселов 2024-09-10 19:36:20 +05:00
commit 2eb65c3092
24 changed files with 566 additions and 49 deletions

View file

@ -0,0 +1,22 @@
using Godot;
using System;
public partial class PlantSlot : Node
{
[Export] private PlantResource _resource;
[Export] private Label _cost;
[Export] private TextureRect _icon;
public void SetPlantResource( PlantResource resource )
{
_resource = resource;
UpdateContents();
}
private void UpdateContents()
{
_cost.Text = _resource.Cost.ToString();
_icon.Texture = _resource.Preview;
}
}