Guest User

Untitled

a guest
Apr 24th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.91 KB | None | 0 0
  1. def createArrwos(self, MapGrid, number):
  2. if(number == 0):
  3. #creates attack arrow pointing top left
  4. X = self.px+2
  5. Y = self.py+2
  6. pygame.draw.polygon(MapGrid, red, [[X, Y], [X+5, Y], [X, Y+5]], 0)
  7. if(number == 1):
  8. X = self.px + cardWidth / 2
  9. Y = self.py + 2
  10. #creates attack arrow pointing up
  11. pygame.draw.polygon(MapGrid, white, [[X, Y], [X+r2, Y+r2], [X-r2, Y+r2]], 0)
  12. if(number == 2):
  13. #X -2 is creates the location on the card, in this case the top right corner
  14. X = self.px + cardWidth - 2
  15. Y = self.py + 2
  16. pygame.draw.polygon(MapGrid, green, [[X, Y], [X-5, Y], [X, Y+5]], 0)
  17. if(number == 3):
  18. X = self.px+cardWidth-2
  19. Y = self.py+cardHeight/2
  20. pygame.draw.polygon(MapGrid, yellow, [[X, Y], [X-r2, Y+r2], [X-r2, Y-r2]], 0)
  21. if(number == 4):
  22. X = self.px+cardWidth-2
  23. Y = self.py+cardHeight-2
  24. pygame.draw.polygon(MapGrid, clearblue, [[X, Y], [X-5, Y], [X, Y-5]], 0)
  25. if(number == 5):
  26. X = self.px+cardWidth/2
  27. Y = self.py+cardHeight-2
  28. pygame.draw.polygon(MapGrid, white, [[X, Y], [X+r2, Y-r2], [X-r2, Y-r2]], 0)
  29. if(number == 6):
  30. X = self.px+2
  31. Y = self.py+cardHeight-2
  32. pygame.draw.polygon(MapGrid, brown, [[X, Y], [X+5, Y], [X, Y-5]], 0)
  33. if(number == 7):
  34. X = self.px+2
  35. Y = self.py+cardHeight/2
  36. pygame.draw.polygon(MapGrid, black, [[X, Y], [X+r2, Y+r2], [X+r2, Y-r2]], 0)
  37.  
  38. def createArrwos(self, MapGrid, number):
  39. if(number == 0):
  40. #creates attack arrow pointing top left
  41. X = self.px+2
  42. Y = self.py+2
  43. pygame.draw.polygon(MapGrid, red, [[X, Y], [X+5, Y], [X, Y+5]], 0)
  44. #creates top arrow
  45. X = self.px + cardWidth / 2
  46. Y = self.py + 2
  47. #creates attack arrow pointing up
  48. pygame.draw.polygon(MapGrid, red, [[X, Y], [X+r2, Y+r2], [X-r2, Y+r2]], 0)
Add Comment
Please, Sign In to add comment