Commit db1a4509 authored by jwacyk's avatar jwacyk
Browse files

modification menu.py

parent a24009df
......@@ -25,47 +25,47 @@ class Menu(object):
def collision(self, player) :
position = player.get_position()
if self.menu_color.collidepoint(position) :
if self.green_rect.collidepoint(position) :
player.set_color(constants.GREEN)
return True
if self.green_rect.collidepoint(position) :
player.set_color(constants.GREEN)
return True
elif self.black_rect.collidepoint(position):
player.set_color(constants.BLACK)
return True
player.set_color(constants.BLACK)
return True
elif self.yellow_rect.collidepoint(position):
player.set_color(constants.YELLOW)
return True
player.set_color(constants.YELLOW)
return True
elif self.orange_rect.collidepoint(position):
player.set_color(constants.ORANGE)
return True
player.set_color(constants.ORANGE)
return True
elif self.red_rect.collidepoint(position):
player.set_color(constants.RED)
return True
player.set_color(constants.RED)
return True
elif self.pink_rect.collidepoint(position):
player.set_color(constants.PINK)
return True
player.set_color(constants.PINK)
return True
elif self.purple_rect.collidepoint(position):
player.set_color(constants.PURPLE)
return True
player.set_color(constants.PURPLE)
return True
elif self.blue_rect.collidepoint(position):
player.set_color(constants.BLUE)
return True
player.set_color(constants.BLUE)
return True
elif self.pretty_blue_rect.collidepoint(position):
player.set_color(constants.PRETTY_BLUE)
return True
player.set_color(constants.PRETTY_BLUE)
return True
elif self.light_blue_rect.collidepoint(position):
player.set_color(constants.LIGHT_BLUE)
return True
player.set_color(constants.LIGHT_BLUE)
return True
elif self.dark_green_rect.collidepoint(position):
player.set_color(constants.DARK_GREEN)
return True
player.set_color(constants.DARK_GREEN)
return True
elif self.brown_rect.collidepoint(position):
player.set_color(constants.BROWN)
return True
player.set_color(constants.BROWN)
return True
elif self.gray_rect.collidepoint(position):
player.set_color(constants.GRAY)
return True
player.set_color(constants.GRAY)
return True
elif self.dark_gray_rect.collidepoint(position):
player.set_color(constants.DARK_GRAY)
player.set_color(constants.DARK_GRAY)
return True
else :
return True
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment