Skip to content
Snippets Groups Projects
Commit 3b89179e authored by Nicholas Danh's avatar Nicholas Danh
Browse files

pink bean

parent 72de3adc
No related branches found
No related tags found
No related merge requests found
...@@ -157,11 +157,11 @@ class Player(Sprite, Singleton): ...@@ -157,11 +157,11 @@ class Player(Sprite, Singleton):
game_window_width = config.XWIN-self.rect.width game_window_width = config.XWIN-self.rect.width
if ((player_x > platform_x and abs(player_x - platform_x < game_window_width / 2)) or if ((player_x > platform_x and abs(player_x - platform_x < game_window_width / 2)) or
(player_x < platform_x and abs(player_x - platform_x) > game_window_width / 2)): (player_x < platform_x and abs(player_x - platform_x) > game_window_width / 2)):
self._velocity.x=-self.__startspeed * closest[0] / 50 self._velocity.x=-self.__startspeed * closest[0] / 30
self._input = -1 self._input = -1
elif ((player_x < platform_x and abs(player_x - platform_x < game_window_width / 2)) or elif ((player_x < platform_x and abs(player_x - platform_x < game_window_width / 2)) or
(player_x > platform_x and abs(player_x - platform_x) > game_window_width / 2)): (player_x > platform_x and abs(player_x - platform_x) > game_window_width / 2)):
self._velocity.x=self.__startspeed * closest[0] / 50 self._velocity.x=self.__startspeed * closest[0] / 30
self._input = 1 self._input = 1
else: else:
self._input = 0 self._input = 0
......
...@@ -18,10 +18,11 @@ GRAY = (100,100,100) ...@@ -18,10 +18,11 @@ GRAY = (100,100,100)
LIGHT_GREEN = (131,252,107) LIGHT_GREEN = (131,252,107)
ANDROID_GREEN = (164,198,57) ANDROID_GREEN = (164,198,57)
FOREST_GREEN = (87,189,68) FOREST_GREEN = (87,189,68)
PINK_BEAN = (255,182,193)
# Player # Player
PLAYER_SIZE = (25,35) PLAYER_SIZE = (25,35)
PLAYER_COLOR = ANDROID_GREEN PLAYER_COLOR = PINK_BEAN
PLAYER_MAX_SPEED = 20 PLAYER_MAX_SPEED = 20
PLAYER_JUMPFORCE = 20 PLAYER_JUMPFORCE = 20
PLAYER_BONUS_JUMPFORCE = 70 PLAYER_BONUS_JUMPFORCE = 70
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment