private void Update() { if (!isReady) { if (!hasJoined && player != null && player.GetAnyButton()) { Join(); } else if (player != null) { GetInput(); ProcessInput(); } } }
private void Update() { if (!Rewired.ReInput.isReady || GameStateManager.Instance.CurrentStage != GameStateManager.GameStage.Game) { return; } // Iterate over existing rewired players and spawn their character if they press a button for (int i = 0; i < Rewired.ReInput.players.playerCount; ++i) { Rewired.Player player = Rewired.ReInput.players.GetPlayer(i); if (!IsPlayerJoined(i) && player.GetAnyButton()) { AddPlayer(player); } } }
private bool ReadAnyControllerInput(string number) { return(player1.GetAnyButton() || player2.GetAnyButton()); }