Пример #1
0
 // Update is called once per frame
 void Update()
 {
     if (currInter != null && Input.GetKeyDown(KeyCode.X))
     {
         if (!isTalking)
         {
             if (!currInter.isItem)
             {
                 isTalking = true;
                 movement.setCanMove(false);
             }
             currInter.Interact();
         }
         else
         {
             isTalking = false;
             movement.setCanMove(true);
             currInter.Close();
         }
     }
 }