Ignore:
Timestamp:
09/01/13 16:39:37 (8 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Draw all the walls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r52 r53  
    9494        body = pymunk.Body()
    9595        body.position = (0, -300)
    96         corners = self._level.get_walls()
    97         corner = corners[-1]
    98         for next_corner in corners:
    99             wall = pymunk.Segment(body, corner, next_corner, 5)
    100             wall.elasticity = 1.0
    101             self.walls.append(wall)
    102             corner = next_corner
     96        walls = self._level.get_walls()
     97        for wall in walls:
     98            corners = wall
     99            corner = corners[-1]
     100            for next_corner in corners:
     101                wall = pymunk.Segment(body, corner, next_corner, 5)
     102                wall.elasticity = 1.0
     103                self.walls.append(wall)
     104                corner = next_corner
    103105        self.space.add(*self.walls)
    104106
Note: See TracChangeset for help on using the changeset viewer.