예제 #1
0
 private void Update()
 {
     if (!isReady)
     {
         if (!hasJoined && player != null && player.GetAnyButton())
         {
             Join();
         }
         else if (player != null)
         {
             GetInput();
             ProcessInput();
         }
     }
 }
예제 #2
0
    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);
            }
        }
    }
예제 #3
0
 private bool ReadAnyControllerInput(string number)
 {
     return(player1.GetAnyButton() || player2.GetAnyButton());
 }