Changeset 628:db960388b912 for nagslang


Ignore:
Timestamp:
09/07/13 23:16:40 (8 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
64323532623832366166323937333932363763313163393539373065623764353032393537353730
Message:

Blast off home.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r624 r628  
    1414    ZORDER_HIGH)
    1515from nagslang.resources import resources
    16 from nagslang.events import DoorEvent
     16from nagslang.events import DoorEvent, QuitEvent
    1717from nagslang.sound import sound
    1818
     
    412412
    413413class Door(BaseDoor):
     414
     415    image_name = "door.png"
     416
    414417    def __init__(self, space, position, destination, dest_pos, angle):
    415418        super(Door, self).__init__(
    416419            space, position, destination, dest_pos, angle,
    417             render.ImageRenderer(resources.get_image('objects', 'door.png')),
     420            render.ImageRenderer(
     421                resources.get_image('objects', self.image_name)),
    418422            environment.YesCondition(),
    419423        )
     
    440444            # New game?
    441445            super(ContinueGameDoor, self)._post_door_event(protagonist)
     446
     447
     448class RocketConsole(Door):
     449
     450    image_name = "rocket_console.png"
     451
     452    def _post_door_event(self, protagonist):
     453        QuitEvent.post()
    442454
    443455
Note: See TracChangeset for help on using the changeset viewer.