コード例 #1
0
 void OnGUI()
 {
     GUI.contentColor = Color.red;
     //prompt to interact with item
     if (containerNear)
     {
         if (collectedEvidence)
         {
             NPCDialogue.InteractionText("Evidence Collected!");
         }
         else if (collectedItem)
         {
             NPCDialogue.InteractionText("Picked Up Item");
         }
         else if (!visited)
         {
             NPCDialogue.InteractionText("Press E to interact");
         }
         else
         {
             NPCDialogue.InteractionText("Nothing here");
         }
     }
     else if (doorNear)
     {
         if (!doorLocked)
         {
             NPCDialogue.InteractionText("Press E to open/close");
         }
         else
         {
             NPCDialogue.InteractionText("Locked, needs a key");
         }
     }
 }