private IEnumerator AskRoutine(AnswerLeftOrRight answerCallback) { const string askLeftOrRightQuestion = "press < or > to equip to a hand"; lockInput = true; float x; itemPanels[focusContent % 10].SetText(askLeftOrRightQuestion); do { yield return(null); itemPanels[focusContent % 10].SetText(askLeftOrRightQuestion); x = Input.GetAxisRaw(Horizontal); }while (x == 0); answerCallback(x < 0); lockInput = false; UpdatePage(); }
private void AskLeftOrRight(AnswerLeftOrRight answerCallback) { StartCoroutine(AskRoutine(answerCallback)); }