Changed how items work

This commit is contained in:
2026-04-18 13:18:06 +01:00
parent 8a6d2eb95f
commit 97a1659359
14 changed files with 460 additions and 995 deletions

View File

@@ -15,19 +15,17 @@ namespace Fruitomation.Game.Items
public ItemType CurrentType
{
get => InternalItemType;
set
{
InternalItemType = value;
}
set => InternalItemType = value;
}
protected virtual void OnInitialized() { }
public void InitBehaviour(Canvas canvas)
public void InitBehaviour(Canvas canvas, ItemType startType)
{
RectTransform = transform.GetComponent<RectTransform>();
Body2D = transform.GetComponent<Rigidbody2D>();
InternalItemType = startType;
AttachedCanvas = canvas;
EnteredCanvas = false;