Advertisement
joaoantoniodornelas

Colisão - Teste

Nov 30th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. bool teste_colisao_nave(float enemies_x, float enemies_y, float player_x, float player_y, int PLAYER_SIZE){
  2.  
  3. if(enemies_y > (player_y - PLAYER_SIZE) && enemies_y < (player_y + enemies_y + PLAYER_SIZE) && enemies_x > (player_x - PLAYER_SIZE) && enemies_x < (player_x + enemies_x + PLAYER_SIZE)){
  4.   return true;
  5. }
  6.  
  7. else{
  8.   return false;
  9.   }
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement