void OnTriggerStay(Collider other) { if (other.gameObject.tag == "Player" && hasTalked[pc.getCurrentCharacter() - 1] == false) { panelInfo.SetActive(true); panelInfo.GetComponentInChildren <Text>().text = "E pour interagir"; } if (other.gameObject.tag == "Player" && hasTalked[pc.getCurrentCharacter() - 1] == true) { panelInfo.SetActive(false); panelInfo.GetComponentInChildren <Text>().text = "E pour interagir"; } if (Input.GetKeyDown(KeyCode.E) && hasTalked[pc.getCurrentCharacter() - 1] == false) { panel.SetActive(true); int currentCharacter = pc.getCurrentCharacter(); qList = dm.GetDialogue(currentScene.buildIndex - 1, id, currentCharacter); qCourante = qList[0]; dm.setButtonQuestion(qCourante.interaction); reponsesQuestion = qCourante.reponseListe; dm.AfficheDialogue(qCourante, qList); hasTalked[pc.getCurrentCharacter() - 1] = true; panelInfo.SetActive(false); } if (dm.GetProgress() == "OK") { door.GetComponent <DoorPivoter>().SwitchDoor_Bis(); } }