Skip to content

Instantly share code, notes, and snippets.

@tracend
Created April 10, 2011 12:00
Show Gist options
  • Save tracend/912283 to your computer and use it in GitHub Desktop.
Save tracend/912283 to your computer and use it in GitHub Desktop.
Unity3D: 2 controllers for a two player fighting game - Source: http://answers.unity3d.com/questions/7211/2-controllers-for-a-two-player-fighting-game
bool inputPlayer1Kick = Input.GetButtonUp("Player1Kick");
bool inputPlayer2Kick = Input.GetButtonUp("Player2Kick");
if(true == inputPlayer1Kick)
{
// player 1 kicked
}
if(true == inputPlayer2Kick)
{
//player 2 kicked
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment