projectEli/Assets/Inventory System/Scripts/UI/LimitStackSlot.cs

47 lines
1.1 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace SimpleInventorySystem
{
public class LimitStackSlot : MonoBehaviour
{
[HideInInspector] public SlotUI Slot;
//public int Weight;
//[HideInInspector] public LimitStackSlotManager limitStackSlotCapacities;
[HideInInspector] public LimitStackItemManager limitStackItemManager;
public void Increment(ItemUI itemUI)
{
limitStackItemManager.Increment(itemUI);
}
public void Decrement(ItemUI itemUI)
{
limitStackItemManager.Decrement(itemUI);
}
public bool HasReachedLimit(ItemUI itemUI)
{
return limitStackItemManager.itemUI.WillExceedMaximumCapacity(itemUI.NestCapacityWeight);
}
private void Awake()
{
Slot = GetComponent<SlotUI>();
}
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}
}