예제 #1
0
 private void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "PLAYER")
     {
         ItemSlotManager.GetInstance().AttachItemInSlot(this);
         gameObject.SetActive(false);
     }
 }
예제 #2
0
파일: Cookie.cs 프로젝트: CBorange/MimePark
 private void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "PLAYER")
     {
         statManager = col.GetComponent <PlayerStatManager>();
         ItemSlotManager.GetInstance().AttachItemInSlot(this);
         gameObject.SetActive(false);
     }
 }
예제 #3
0
파일: Key.cs 프로젝트: CBorange/MimePark
 private void OnTriggerEnter2D(Collider2D col)
 {
     if (col.tag == "PLAYER")
     {
         playerTrans = col.gameObject.transform;
         gameObject.SetActive(false);
         StageDataManager.GetInstance().HaveKey += 1;
         ItemSlotManager.GetInstance().AttachItemInSlot(this);
     }
 }
예제 #4
0
 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);
         }
     }
 }