Ejemplo n.º 1
0
 private void Update()
 {
     if (currentInteractable != null)
     {
         if (currentInteractable.currentUser == c1.companionID)
         {
             if (Input.GetKeyDown(KeyCode.Alpha1))
             {
                 currentInteractable.interact(c1);
             }
         }
         else if (currentInteractable.currentUser == c2.companionID)
         {
             if (Input.GetKeyDown(KeyCode.Alpha2))
             {
                 currentInteractable.interact(c2);
             }
         }
         else
         {
             if (Input.GetKeyDown(KeyCode.Alpha1))
             {
                 currentInteractable.interact(c1);
             }
             else if (Input.GetKeyDown(KeyCode.Alpha2))
             {
                 currentInteractable.interact(c2);
             }
         }
     }
 }