newlon/scripts/gui/seedpackets/PrepickedDummyHandler.cs
2025-07-29 04:08:05 +05:00

15 lines
No EOL
625 B
C#

namespace Newlon.Components.GUI.Seedpackets;
public class PrepickedDummyHandler : SeedpacketHandler
{
public PrepickedDummyHandler(Seedpacket owner) : base(owner)
{
if (LevelGUIElements.Instance.SeedpacketsHotbar.GetChildCount() >= PlayerProgress.Instance.MaxSeedpackets) return;
_owner.disablePacket = true;
var hotbarSeedpacket = Seedpacket.Prefab.Instantiate<Seedpacket>();
LevelGUIElements.Instance.SeedpacketsHotbar.AddChild(hotbarSeedpacket);
hotbarSeedpacket.SetResource(_owner.GetResource());
hotbarSeedpacket.SetHandler(new PrepickedHandler(_owner));
}
}