Skip to content

Instantly share code, notes, and snippets.

@jafstar
Created January 29, 2012 05:14
Show Gist options
  • Save jafstar/1697318 to your computer and use it in GitHub Desktop.
Save jafstar/1697318 to your computer and use it in GitHub Desktop.
Multiplayer Objects - Auto vs Jump
//AUTO
if(player.y >= floor_base - 20 && player.x <= 2680 && player.x >= 2070){
floor_y = floor_base - 20;
player.y = floor_base - 20;
}
//JUMP
if( player.y == floor_base - 20 && player.x <= 700 && player.x >= 400){
floor_y = floor_base - 20;
player.y = floor_base - 20;
}
//AUTO MEANS THE PLAYER IS AUTOMATICALLY RAISED 20px;
//JUMP MEANS THE PLAYER HAS TO JUMP TO BE RAISED 20px;
//AUTO REQUIRES THAT PLAYER.Y be ' >= '
//OR THE PLAYER CANT JUMP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment