Ignore:
Timestamp:
09/03/13 14:58:45 (8 years ago)
Author:
Neil Muller <drnlmuller@…>
Branch:
default
Phase:
public
Rebase:
36616364363066663031393763616436626334636264353230353363646637376262616364306264
Message:

Add DoorEvent and tweak ScreenChange to keep more state when the player goes through a door

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r176 r180  
    1010from nagslang.options import options
    1111from nagslang.resources import resources
    12 from nagslang.events import ScreenChange
     12from nagslang.events import DoorEvent
    1313
    1414
     
    407407            if shape.collision_type == COLLISION_TYPE_PLAYER:
    408408                # Force to new position
    409                 shape.body.position = self.dest_pos
    410                 ScreenChange.post(self.destination)
     409                DoorEvent.post(self.destination, self.dest_pos)
Note: See TracChangeset for help on using the changeset viewer.