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; } } }
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; } } }