newlon/scripts/droppable-items/DroppableSeedpacket.cs
2025-07-25 18:48:49 +05:00

22 lines
589 B
C#

using Godot;
using Newlon.Resources;
namespace Newlon.Components.Droppables;
public partial class DroppableSeedpacket : DroppableItem
{
public PlantResource plant;
[Export] private Label _cost;
[Export] private TextureRect _icon;
[Export] private TextureRect _packet;
public override void _Ready()
{
_cost.Text = plant.Cost.ToString();
_icon.Texture = plant.Preview;
if (plant.CustomFrame != null)
{
_packet.Texture = plant.CustomFrame.frame;
_cost.LabelSettings = plant.CustomFrame.font;
}
}
}