Permalink
Browse files

change deadline

  • Loading branch information...
BorisKolganov committed Sep 18, 2018
1 parent 22e1131 commit 9b383225cb22400d6e340cf27d494daece42eb28
Showing with 4 additions and 2 deletions.
  1. +3 −1 madcars/Runners/mechanic/game_objects/deadline.py
  2. +1 −1 madcars/Runners/mechanic/match.py
@@ -4,11 +4,13 @@
class DeadLine:
ASC = 0
DESC = 1
deadline_height = 20
def __init__(self, type, max_length, max_height):
self.type = type
self.line_body = pymunk.Body(0, 0, pymunk.Body.KINEMATIC)
self.line = pymunk.Poly(self.line_body, [(0, 2), (max_length, 2), (max_length, -max_height), (0, -max_height)])
self.line = pymunk.Poly(self.line_body, [(0, 2), (max_length, 2),
(max_length, -self.deadline_height), (0, -self.deadline_height)])
self.line.sensor = True
self.line.body.position = (0, 10 if self.type == self.ASC else max_height - 10)
@@ -17,7 +17,7 @@ def __init__(self, map, car, players, space):
self.players = players
self.map_objects = map(space).get_objects_for_space()
self.cars_objects = []
self.deadline = DeadLine(DeadLine.ASC, 1800, 800)
self.deadline = DeadLine(DeadLine.ASC, 1200, 800)
self.map_objects.append(self.deadline.get_object_for_space())
self.dead_players = set()

0 comments on commit 9b38322

Please sign in to comment.