droppable items and win

This commit is contained in:
Rendo 2025-07-20 22:11:23 +05:00
commit 5bdbfa4d82
47 changed files with 820 additions and 85 deletions

View file

@ -0,0 +1,25 @@
using Godot;
using Newlon;
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;
}
}
public override void PickUp()
{
EmitSignal(SignalName.PickedUp);
}
}