private void Update() { if (!waiting && (Input.GetKeyDown(KeyCode.Space) || Input.GetMouseButtonDown(0))) { switch (state) { case State.Dialogue: if (ScenarioReader.Next(ref readData)) { UpdateUI(); } else { CloseUI(); } break; case State.Seletion: ShowSelectionPanel(); break; case State.WaitToSeletion: break; } } if (Input.GetKeyDown(KeyCode.R)) { PlayScenario(); } }
public void OnSelectionClick(int index) { if (ScenarioReader.Next(index, ref readData)) { UpdateUI(); } else { CloseUI(); } }