예제 #1
0
 private void Pickup()
 {
     if (KeyItem)
     {
         if (PickupQuestID == Player.CurrentPickupQuestStage)
         {
             Player.ProgressPickupQuest();
             infoText.text = KeyItemMessage;
             Player.InfoUp = true;
             this.gameObject.SetActive(false);
             if (EnableChest == true)
             {
                 Player.AddToInventory("Chest");
             }
             else if (EnableHeart == true)
             {
                 Player.AddToInventory("Heart");
             }
         }
         else
         {
             infoText.text = "I shouldn't take this right now.";
             InfoUp        = true;
         }
     }
     else
     {
         this.gameObject.SetActive(false);
     }
 }