// Update is called once per frame void Update() { if (inFlowChart) { return; } Vector3 move = new Vector3(Input.GetAxis("Horizontal"), 0); Vector3 newPosition = transform.position + (move * speed * Time.deltaTime); transform.position = newPosition; if (Input.GetAxis("Horizontal") > 0) { transform.localRotation = Quaternion.Euler(0, 180, 0); } else if (Input.GetAxis("Horizontal") < 0) { transform.localRotation = Quaternion.Euler(0, 0, 0); } if (interacting) { if (Input.GetKeyDown(KeyCode.UpArrow)) { NpcController npc = npcObject.GetComponent <NpcController>(); prepareFungusForConverstion(npc); clock.paused = true; npc.pausedPlayer(); talking = true; setInFlowChart(true); } } }