Skip to content

Commit

Permalink
Fix speed update
Browse files Browse the repository at this point in the history
  • Loading branch information
wellington36 committed Feb 1, 2022
1 parent 2393739 commit 6440302
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ def reset_game(self):
self.current_speed_x = 0
self.level = "LEVEL: 1"
self.score_text = "SCORE: 0"
self.SPEED = 0.5
self.SPEED_X = 1.5

self.tiles_coordinates = []
self.pre_fill_tiles_coordinates()
Expand Down
2 changes: 1 addition & 1 deletion src/transforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def tranform_perspective(self, x, y):
diff_x = x - self.perspective_point_x
diff_y = self.perspective_point_y - lin_y
factor_y = diff_y/self.perspective_point_y
factor_y = pow(factor_y, 4)
factor_y = pow(factor_y, 5)

tr_x = self.perspective_point_x + diff_x*factor_y
tr_y = self.perspective_point_y - factor_y * self.perspective_point_y
Expand Down

0 comments on commit 6440302

Please sign in to comment.