Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
sygyzy committed May 13, 2016
1 parent 9afa3cf commit 08948df
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions a.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,34 @@ public void loop()
}



//Keep these declarations outside the loop
boolean pressed = false;
state = 0;
numberOfStates = 2;

//Stuff here goes in a loop
if(gamepad1.b)
{
if(!pressed)
{
state = (state + 1) % numberOfStates;
}
pressed = true;
}
else
{
pressed = false;
}

switch(state)
{
case 0:
//Blah
break;

case 1:
//Bleh
break;
}
}

0 comments on commit 08948df

Please sign in to comment.