public void HandleOptions() { if (m_Input.InteractInput) { //select an option and set everything back to normal dialogueUI.SetIsInOptions(false); IsInOptions = false; RightArrow.SetActive(false); LeftArrow.SetActive(false); dialogueUI.SelectOption(optionSelected); dialogueUI.CallOnOptionsEnd(); } else if (Input.GetKeyDown("right") && optionSelected < optionsAvailable.Options.Length - 1 && TimeBetweenLinesTimer <= 0) { //allows to use the option arrows for the dialogue optionSelected++; dialogueUI.MarkLineComplete(); dialogueRunner.HandleLine(optionsAvailable.Options[optionSelected].Line); LeftArrow.SetActive(true); if (optionSelected == optionsAvailable.Options.Length - 1) { RightArrow.SetActive(false); } TimeBetweenLinesTimer = TimebetweenLinesCooldown; } else if (Input.GetKeyDown("left") && optionSelected > 0 && TimeBetweenLinesTimer <= 0) { //allows to use the option arrows for the dialogue optionSelected--; dialogueUI.MarkLineComplete(); dialogueRunner.HandleLine(optionsAvailable.Options[optionSelected].Line); RightArrow.SetActive(true); if (optionSelected == 0) { LeftArrow.SetActive(false); } TimeBetweenLinesTimer = TimebetweenLinesCooldown; } }