Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         if (manager.quests[questID].gameObject.activeInHierarchy &&
             !manager.QuestComplete(questID))
         {
             manager.itemCollected = itemName;
             gameObject.SetActive(false);
         }
     }
 }
Ejemplo n.º 2
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Player"))
     {
         if (!manager.QuestComplete(questID))
         {
             if (startPoint && !manager.quests[questID].gameObject.activeInHierarchy)
             {
                 manager.quests[questID].gameObject.SetActive(true);
                 manager.quests[questID].StartQuest();
             }
             else if (endpoint && manager.quests[questID].gameObject.activeInHierarchy)
             {
                 manager.quests[questID].CompleteQuest();
             }
         }
     }
 }