Changeset 628:db960388b912


Ignore:
Timestamp:
Sep 7, 2013, 11:16:40 PM (7 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
rebase_source:
d252b826af29739267c11c95970eb7d502957570
Message:

Blast off home.

Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • data/levels/end

    r625 r628  
    1010- args:
    1111  - [300, 125]
    12   - 'Case closed! Time to head for home.'
     12  - Case closed! Time to head for home.
    1313  classname: Note
    1414- args:
    1515  - [300, 475]
    16   - 'Rwarr! I'm a monster. :)'
     16  - 'Rwarr! I''m a monster. :)'
    1717  classname: Note
    1818- args:
    1919  - [550, 475]
    20   - 'Go through this door to restart the game.'
     20  - Go through this door to restart the game.
    2121  classname: Note
    2222  name: note_restart
     
    2929- args:
    3030  - [650, 300]
    31   - 'Go through this door to replay the final battle!'
     31  - Go through this door to replay the final battle!
    3232  classname: Note
    3333  name: note_continue
     
    3636  classname: FloorSwitch
    3737  name: cockpit_switch
     38- args:
     39  - [59, 298]
     40  - end
     41  - [100, 100]
     42  - 0
     43  classname: RocketConsole
     44  name: rocket_console
    3845- args:
    3946  - [225, 250]
     
    8491- args:
    8592  - [550, 125]
    86   - 'Alien vs Werewolf III -- now showing!'
     93  - Alien vs Werewolf III -- now showing!
    8794  classname: Note
    8895  name: keyhints
     96- args:
     97  - [129, 299]
     98  - Fire up the engines and head home!
     99  classname: Note
     100  name: blast_off
    89101lines: []
    90102music: POL-cyber-factory-short.ogg
     103music_volume: 0.3
    91104polygons:
    92105  1:
  • 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.