private IEnumerator OnTagRoutine(Chara winner) { HideCourt(); // Wait for end of turn change if happened on same frame as turn change while (State == MatchState.TurnChange) { yield return(null); } // State and score State = MatchState.Tagged; ++scores[winner.PlayerID]; yield return(new WaitForSeconds(1f)); // Show UI match_ui.ShowTagScreen(winner, scores); charas[0].ShowReplay(); charas[1].ShowReplay(); // Wait if ((ControlScheme)InputExt.GetPlayerScheme(winner.PlayerID) == ControlScheme.AI) { yield return(new WaitForSeconds(2.5f)); } else { while (!InputExt.GetKeyDown(winner.PlayerID, Control.Action)) { yield return(null); } } // Hide UI match_ui.HideTagScreen(); // Reset if (on_reset != null) { on_reset(); } // Next turn StartNextTurn(); }
private IEnumerator UpdateHuman() { while (true) { while (Time.timeScale == 0) { yield return(null); } des_move_dir = new Vector2( InputExt.GetAxis(PlayerID, Control.X), InputExt.GetAxis(PlayerID, Control.Y)).normalized; if (InputExt.GetKeyDown(PlayerID, Control.Action)) { UsePower(); } yield return(null); } }