Advertisement
Guest User

Example Code

a guest
Feb 29th, 2012
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.44 KB | None | 0 0
  1.                 case SDLK_a:
  2.                     for (int i=0; i<MAP::wall.size(); i++)
  3.                     {
  4.                           if (cMap.check_collision(cMap.wall.at(i), cDisplay.getPlayer(playerx, playery)))
  5.             {
  6.                            exit(0);
  7.                     }
  8.                 }
  9.                     // Player Going Some Direction
  10.                     playerxvel -= speed;
  11.                     // Stop Checking
  12.                     break;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement