Prepicked plants editor
This commit is contained in:
parent
9eba7d3069
commit
56f75a5d06
43 changed files with 532 additions and 50 deletions
15
scripts/gui/seedpackets/PrepickedDummyHandler.cs
Normal file
15
scripts/gui/seedpackets/PrepickedDummyHandler.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue