Esempio n. 1
0
    private bool checkIfGameObjectIsInteractible(GameObject checkMe)
    {
        BasicNPCInteractionScript bco = checkMe.GetComponentInChildren <BasicNPCInteractionScript>();

        if (bco is IInteractible)
        {
            return(true);
        }
        else
        {
            return(false);
        }
    }
Esempio n. 2
0
 private void executeSingleInteractible(GameObject executeMe)
 {
     if (!checkIfGameObjectIsInteractible(executeMe))
     {
         return;
     }
     else
     {
         BasicNPCInteractionScript bco = executeMe.GetComponentInChildren <BasicNPCInteractionScript>();
         if (bco is IInteractible)
         {
             ((IInteractible)bco).DoInteract(gameObject);
         }
         else
         {
             return;
         }
     }
 }