TankorSmash

particle collision

Jan 24th, 2012
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.69 KB | None | 0 0
  1.  
  2.         #write temp vars then test  wall
  3.        
  4.         #check for walls:
  5.         if 0 > x or x > WIDTH:
  6.             dx = dx * -1
  7.             print 'x is out', x
  8.             #if dx2 > 0:
  9.                 #dx2 += 1
  10.             #elif 0 < dx2:
  11.                 #dx2 += -1
  12.                
  13.             #else:
  14.                 #print dx2, 'x probably equals 0'
  15.            
  16.         if 0 > y or y > HEIGHT:
  17.             dy = dy * -1
  18.            
  19.             print 'y is out', y
  20.            
  21.             #if dx2 > 0:
  22.                 #dy2 += 1
  23.             #elif 0 < dy2:
  24.                 #dy2 += -1
  25.                
  26.             #else:
  27.                 #print dy2, 'y probably equals 0'
Advertisement
Add Comment
Please, Sign In to add comment