Changeset 124:fde3d25cb4b9


Ignore:
Timestamp:
Apr 4, 2011, 9:19:34 PM (9 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Message:

Replace custom clamping code with a call to .clamp_ip.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • skaapsteker/levelscene.py

    r123 r124  
    9393        lr = self._level_surface.get_rect()
    9494        cr.center = self._player.rect.center
    95         cr.move_ip(-min(cr.left - lr.left, 0), -min(cr.top - lr.top, 0))
    96         cr.move_ip(min(lr.right - cr.right, 0), min(lr.bottom - cr.bottom, 0))
     95        cr.clamp_ip(lr)
    9796
    9897    def dispatch(self, ev):
Note: See TracChangeset for help on using the changeset viewer.