예제 #1
0
 public void OnTriggerExit2D(Collider2D C2D)
 {
     if (C2D.GetComponent <InputArea>() && C2D.GetComponent <InputArea>() == CurrentArea)
     {
         Deactivate();
     }
     if (C2D.GetComponent <InterObject>())
     {
         InterObject IO = C2D.GetComponent <InterObject>();
         if (InterObjects.Contains(IO))
         {
             InterObjects.Remove(IO);
         }
     }
     if (C2D.GetComponent <ChoiceRenderer>())
     {
         ChoiceRenderer CR = C2D.GetComponent <ChoiceRenderer>();
         if (CRs.Contains(CR))
         {
             CRs.Remove(CR);
         }
     }
     if (C2D.GetComponent <NPC>() && SelectingNPC == C2D.GetComponent <NPC>())
     {
         SelectingNPC = null;
     }
 }
예제 #2
0
 public void OnTriggerEnter2D(Collider2D C2D)
 {
     if (Room.Current)
     {
         if (C2D.GetComponent <InputArea>())
         {
             CanInput    = true;
             CurrentArea = C2D.GetComponent <InputArea>();
         }
         if (C2D.GetComponent <InterObject>())
         {
             InterObject IO = C2D.GetComponent <InterObject>();
             if (!InterObjects.Contains(IO))
             {
                 InterObjects.Add(IO);
             }
         }
         if (C2D.GetComponent <ChoiceRenderer>())
         {
             ChoiceRenderer CR = C2D.GetComponent <ChoiceRenderer>();
             if (!CRs.Contains(CR))
             {
                 CRs.Add(CR);
             }
         }
         if (C2D.GetComponent <NPC>())
         {
             SelectingNPC = C2D.GetComponent <NPC>();
         }
     }
 }