コード例 #1
0
 void Update()
 {
     if (monitor)
     {
         if (CheckForDirectionalKeyPress())
         {
             if (!closetControl.IsLocked)
             {
                 closetControl.Interact(gameObject, "lefthand");
             }
         }
         //take the player with the closet so they can interact with it
         if (closetControl.transform.position != transform.position)
         {
             transform.position = closetControl.transform.position;
         }
     }
 }
コード例 #2
0
 private void Update()
 {
     if (PlayerManager.LocalPlayerScript.playerNetworkActions.isGhost || UIManager.IsInputFocus)
     {
         return;
     }
     if (monitor)
     {
         if (CheckForDirectionalKeyPress())
         {
             if (!closetControl.IsLocked)
             {
                 closetControl.Interact(gameObject, "lefthand");
             }
         }
         //take the player with the closet so they can interact with it
         if (closetControl.transform.position != transform.position)
         {
             transform.position = closetControl.transform.position;
         }
     }
 }