public void ExitComputer() { ChangeCurrentScreen(loginScreen1); DeactivateGameObject(gameObject); InteractWithUIObject playerScript = currentPlayer.GetComponent <InteractWithUIObject>(); playerScript.ExitInteraction(); OnExit.Invoke(); }
void Start() { player = GameObject.FindGameObjectWithTag("Player"); controlScript = player.GetComponent <PlayerControls>(); interactWithUIObject = player.GetComponent <InteractWithUIObject>(); grabbingItem = player.GetComponentInChildren <GrabItem>(); CamToMouse = player.GetComponentInChildren <CameraToMouse>(); }