private void OnTriggerEnter2D(Collider2D col) { if (col.tag == "PLAYER") { ItemSlotManager.GetInstance().AttachItemInSlot(this); gameObject.SetActive(false); } }
private void OnTriggerEnter2D(Collider2D col) { if (col.tag == "PLAYER") { statManager = col.GetComponent <PlayerStatManager>(); ItemSlotManager.GetInstance().AttachItemInSlot(this); gameObject.SetActive(false); } }
private void OnTriggerEnter2D(Collider2D col) { if (col.tag == "PLAYER") { playerTrans = col.gameObject.transform; gameObject.SetActive(false); StageDataManager.GetInstance().HaveKey += 1; ItemSlotManager.GetInstance().AttachItemInSlot(this); } }
public void UseItemInSlot() { if (AttachedItem != null) { if (!AttachedItem.ItemActive()) { return; } if (AttachedItem.IsConsumable) { ItemImage.gameObject.SetActive(false); AttachedItem = null; ItemSlotManager.GetInstance().AttachAbleSlot.Insert(0, SlotIndex); } } }